I am new to Octave and would like to know how to solve nonlinear equation. Here is an example equation
x^4-16x^3+61x^2-22x-12=0
Update:
w+x+y+1=3
2w+3x+4y+5=10
w-x+y-1=4
thanks
I am new to Octave and would like to know how to solve nonlinear equation. Here is an example equation
x^4-16x^3+61x^2-22x-12=0
Update:
w+x+y+1=3
2w+3x+4y+5=10
w-x+y-1=4
thanks
fsolve
is a good place to start.Use
fzero
to get the solution closest to a givenx0
(well, not necessarily closest, but the first one found):This should work:
Also, you should check out
roots
, to get all the solutions of a polynomial.Ok, so I'll answer the second question anyway: