|
weicell wrote: So I am READY for CHEMICAL ENGINEERING! But not FOR Computer ENGINEERING! ok?
I have a degree in Computer Science, but I also had to take courses in Communication, History, and Humanities. I, not someone else, had to study those right along with my major. Why should you think you are so different?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
AND ALSO,
They(my CLASSMATES)deserve A+ because of their money,I DO not Deserve ,BECAUSE I am POOR!!!
BLA BLa BLA!
|
|
|
|
|
So why don't your study MATHLAB ? You can earn money in your Country with such knowledge thus becoming a rich man.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Because , This year they begin to study Matlab to us.(ABout 1 month)
So We cannot Study MATLAB as well.
Matlab is 1 cemester lesson in my School.
Any way,If any one help me,I appriciate.
Any one ,who want to help me do not have do all the script,If he/she shows me the way to write this script,It will be necessary for me.
It is not important me to be rich ,I want to be JUSt Happy,I am 24 ,I am not rich,poor in deed.But Until this week I am Happy,But this script makes me VERY sad.
Anyway,my mail adress is weicell@yahoo.com
you can contact me her or via mail.
THANK you .
|
|
|
|
|
weicell wrote: I am 24
24 years old and you can't do your own homework. Don't you think it's time you grew up and acted like an adult?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Never!!
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
cp9876 wrote: I've done all the exams I intend to do.
Same here. Just happened to get down this far in the math forum today
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
c=zeros(5,1);
for i=1:1000
c1=100/110;
c(1,1)=c1;
c2=(100*c(1,1)-5*c(3,1))/130;
c(2,1)=c2;
c3=(100*c(2,1)+5*c(4,1))/120;
c(3,1)=c3;
c4=(95*c(3,1)+10*c(5,1))/120;
c(4,1)=c4;
c5=(95*c(4,1)/124);
c(5,1)=c5;
end
I have Wrote This Script For The Second Question(First Quetsion in the Web site)
Just tell me That,Is it true or not?
How can I edit this?
I need Help ,Why Dont you help me???
|
|
|
|
|
weicell wrote: hat,Is it true or not?
What?
weicell wrote: How can I edit this?
With a text editor, I suppose.
weicell wrote: I need Help ,Why Dont you help me???
Have you read forum guidelines?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I ask That,The script That I wrote is true or not?
Is it editable?And Which changes can I make in the script?
And I wrote Another;
But there is a problem Take a look at this;
function [z,y,wmax,xmax]=Condition(A)
[m,n]=size(A); % Get the dimensions of A
w=ones(m,1); % Start with initial guess eigenvalues
imax=60;
tol=10^-10;
for i=1:imax
[kk,k]=max(abs(w)); % Returns the indices of the maximum w values in vector k
z=w/w(k); % Normalize w with respect to maxw=w(k)
w=A*z; % Calculate w again
wmax=w(k); % z(k)=1
r=norm(wmax*z-w); % Use Euclidean form (norm(w,p) = sum(abs(w).^p)^(1/p))
final=[i,wmax,r,z'];
if r<tol, break="">
end
B=inv(A);
% Get the dimensions of A
x=ones(m,1); % Start with initial guess eigenvalue
for i=1:imax
[kk,k]=max(abs(x)); % Returns the indices of the maximum w values in vector k
y=x/x(k); % Normalize w with respect to maxw=w(k)
x=B*y; % Calculate w again
xmax=x(k); % z(k)=1
r=norm(xmax*y-x); % Use Euclidean form (norm(w,p) = sum(abs(w).^p)^(1/p))
final=[i,xmax,r,y'];
if r<tol, break<br="" mode="hold"> end
end
end
xmin=1/xmax
wmax
condition=wmax*xmax
And An erro occurs;
Error in ==> Condition at 2
[m,n]=size(A); % Get the dimensions of A
How can I correct it?
>>
|
|
|
|
|
weicell wrote: Is it editable?
By virtue of you writing initially it, wouldn't it therefore be editable?
weicell wrote: And Which changes can I make in the script?
Whatever changes you deem necessary.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
weicell wrote: Write a MATLAB® function to...
It's amazing how many folks that post here cannot even do something as simple as disguise a homework question. Did it not once occur to you to try something like:
I need help with a Matlab project that I am working on. It's a program to calculate the condition number of a symmetric square matrix of any size by means of Eigenvalues. I'm a chemical engineer so the math is no problem; I can do this on paper. It's turning that into Matlab script that is troubling me. So far I've tried is x, y, and z. The result I am seeing is ..., or the error I keep getting is...
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
weicell wrote: PLease Help me I am n a hurry,
I have to send it to my instructor on sunday...
How bloody rude can you be? Hope you didn't get it to him in time.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Any one has measured the process time of the Skipjack and RC5 in java implementation by n.s before?
|
|
|
|
|
Bimbaa wrote: Any one has measured the process time of the Skipjack and RC5 in java implementation by n.s before?
Nope. How about you try it?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Yes. i will do them as soon. I have tried implementation in java by DES and 3DES before. The enc/dec process speed of them were slower than implementation in any C prog language. if any one did imp. in java for the AES previous time, please show me the result of the process speed by n.s?
DES
enc: 804172
dec: 442647
3DES
enc: 1604512
dec: 1214572
Maybe if someone tried them, please write process time here to compare it them. I think the time is defenced on your computer hardware also.
|
|
|
|
|
Hello All,
I'm having trouble designing an algorithm for the following problem:
given an array of N elements, generate all combinations of arrays whose values are greater than 0 and sum to 1, given an interval M.
For example:
generate all combinations of arrays with positive values that sum to 1 with N = 4 and M = 0.1
[1,0,0,0]
[0,1,0,0]
[0,0,1,0]
[0,0,0,1]
[0.7,0.1,0.1,0.1]
...
until done
Can some out there with a bigger brain than mine help me come up with a solution?
TIA,
Soren
|
|
|
|
|
Hi Soren,
you can solve this recursively: choose an arbitrary first number (in a loop), then
solve the same but smaller problem with adjusted parameters, hence recurse until
the smaller problem is straightforward.
BTW: with real numbers, there is an infinite number of solutions. So you must be
careful with the wording of the problem itself.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
What about the brutal approach
#include <stdio.h>
void main()
{
int n;
int i,j,k,l;
n=0;
for (i = 0; i <= 10; i++)
for (j = 0; j <= 10; j++)
for (k = 0; k <= 10; k++)
for (l = 0; l <= 10; l++)
if ( i + j + k + l == 10)
{
printf("%d [%d, %d, %d, %d]\n", n++, i,j,k,l);
}
}
I know it's a waste of cycles...
(And actually I don't know even if it is correct )
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
CPallini wrote: (And actually I don't know even if it is correct )
You must therefore come up with a separate program to verify the output of this one.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
That was going on my arrogant assumptions: of course the proof (whatever it will be, not necessary another program) it's left to the OP.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Incidently, correctness proof is very simple (if I'm right).
Since the approach (i.e. brute force), the code enumerates all possible sequences (base 11 notation ):
0000
0001
0002
....
000A
0010
....
00AA
0100
....
AAAA
selecting only the ones summing up to A . Hence it exaustive and each selected sequence is unique.
Off course it is not a formal proof, but you get the idea.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
This is just an awkward way of phrasing a standard combinatorial problem.
Think of your numbers as little rods (some of zero length), now in each combination lay out the rods end to end, note that they combine to length 1. Note that the combination can be expressed by simply listing the finishing locations of each rod, and these occur on the boundaries of the M subintervals.
If you consider the interval [0,1] broken into M subintervals, what you have to do is to enumerate how many ways you can allocate N items into M+1 boxes. Each box is the end of an interval. So if M=10 and one allocation goes {1,2,0,1..} then your numbers are {0, 0.1, 0, 0.2, ..}. They are guaranteed to add to 1 by construction.
The algorithm is probably most easily implemented recursively.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
cp9876 wrote: Think of your numbers as little rods
Does that really help you?
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
No it didn't help me, I added it last thing when I thought my description looked a bit abstract. When I added is I was thinking of cuisenaire rods (link[^]), but others may not know what they are.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|