Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: fsolve won't solve non-linear system of equations
Replies: 1   Last Post: Dec 16, 2011 7:03 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Marcio Barbalho

Posts: 15
Registered: 6/2/10
fsolve won't solve non-linear system of equations
Posted: Dec 16, 2011 6:10 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi you all.

I've had a hard time understanding why matlab can't solve this problem using fsolve.

It's a system of non-linear equations.

These are the m-files:

function F = ORVP(k)
F(1) = 0.6*k(3)/k(2)*44.44-k(1);
F(2) = 1/( 0.6/(k(2)*44.44)+0.4/(k(4)*65.43))-k(3);
F(3) = 1 - k(1)-k(5);
F(4) = exp(1.107*k(5)^2)-k(2);
F(5) = exp(1.107*k(1)^2)-k(4);
end

clc
k0 = [0.81; 1.03; 62.89; 2.09; 0.19];
options=optimset('Display','iter','MaxFunEvals',5d4,'MaxIter',1d4);
[x,fval] = fsolve(@ORVP,k0,options)

where k0, starting guess, is the solution already. It just won't get to the result. I've double-checked the equations, they are fine!

Any ideas?

Many thanks



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.