×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

nonlinear systems of equations

nonlinear systems of equations

nonlinear systems of equations

(OP)
Hi everybody,

I am a biginner in Matlab (Release 13)
I have to resolve the following non linear systems of equations:

5.387=k1+k2+k3+3.92
0.022=sqrt{5.387-4*[k3*(3.92+k2)+k1*(k2+k3)]}
1.51326= {3.92+k1+k2+k4+sqrt[(3.92+k1+k2+k4)^2-4*k1*(k2+k4)]}/2
1.52376={3.92+k1+k2+k4-sqrt[(3.92+k1+k2+k4)^2-4*k1*(k2+k4)]}/2

May somebody help me???
Thanks

RE: nonlinear systems of equations

use fsolve.

i wont be able to give the syntax better than the tutorial, so i suggest you try there, but here:

make an m file with your functions:
-------------------------------------------------------
function F = funcs(k)

  F = [k(1)+k(2)+k(3)+3.92-5.387;
       sqrt(5.387-4*(k(3)*(3.92+k(2))+k1*(k(2)+k(3))))-0.022;
       (3.92+k(1)+k(2)+k(4)+sqrt((3.92+k(1)+k(2)+k(4))^2-4*k(1)*(k(2)+k(4))))/2 - 1.51326;
       (3.92+k(1)+k(2)+k(4)-sqrt((3.92+k(1)+k(2)+k(4))^2-4*k(1)*(k2+k(4))))/2 - 1.52376;]

end
-------------------------------------------------------
in the command, you will need to make a starting guess. I will leave that up to you and just put all 1's.
-------------------------------------------------------
guess[1 1 1 1];
fsolve(@funcs,guess);
-------------------------------------------------------
I think this should work. Try it out. I think when you mean to use parenthesis, only use parenthesis. Dont use square or regular brackets. They denote something else entirely. Notice that I moved the values on one side of the equations to the other so that it equals 0. If this doesnt work, consult the Matlab help. Look up fsolve. I just started using it myself, so I might have missed something.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources