Filter löschen
Filter löschen

Non linear equation solution by FSOLVE command

1 Ansicht (letzte 30 Tage)
Mohammad Yunus Ali
Mohammad Yunus Ali am 5 Mär. 2011
Can anyone post a simple matlab program to solve two or three equations using fsolve function?

Antworten (1)

Walter Roberson
Walter Roberson am 5 Mär. 2011
Here is one online tutorial
  2 Kommentare
Mohammad Yunus Ali
Mohammad Yunus Ali am 5 Mär. 2011
the tutorial is not helpful for me. I tried to write a code like below but its giving error. could u pls correct it?
function f=nle(x)
f(1)=x(1)-4*x(1)^2-x(1)*x(2);
f(2)=2*x(2)-x(2)^2+3*x(1)*x(2);
end
x0=[1 1];
x=fsolve('nle';x0)
Walter Roberson
Walter Roberson am 5 Mär. 2011
You missed a sentence,
"Enter the initial guess
x0 = [1 1]'
Note: x0 is the TRANSPOSE of a row vector"
You did not use the transpose.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Linear Algebra finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by