Matlab中fsovle 函数调用?
function F=F(X)
global M N;
F(1)=2*m+a^2-1; F(2)=n+b*5;
a=X(1);b=X(2);%待求量
定义M N 为全局变量;.
global M N; N=0.1;
for M=0.1:0.1:1
{
X=fsolve('fxyz',[1,0]);
if (0<X(1)<2&&0<X(2)<2)
return
else
break
}
end
end
为什么会报错:
X=fsolve('fxyz',[1,0]);
The expression to the left of the equals sign is not a valid target for an assignment