Non linear equation solution by FSOLVE command

1 次查看(过去 30 天)
Can anyone post a simple matlab program to solve two or three equations using fsolve function?

回答(1 个)

Walter Roberson
Walter Roberson 2011-3-5
Here is one online tutorial
  2 个评论
Mohammad Yunus Ali
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 2011-3-5
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by