作业帮 > 综合 > 作业

matlab中fsolve解非线性方程组算例

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/06/06 05:48:26
matlab中fsolve解非线性方程组算例
>> syms x y
eq1=(1-0.14*x^2)*(0.3+0.7*exp(-0.65*x^6))-0.2537*y;
eq2=x-3.9735*y;
ezplot(eq1)
hold on
ezplot(eq2)
x0=[2 1;-4 -1]
for ii=1:2
[x fval]=fsolve(@f,x0(ii,:))
end
运行时总出现
Error:"f" was previously used as a variable,
conflicting with its use here as the name of a function.
是怎么回事?另外x0为什么有两组数值?
fsolve的第一个参数f是什么 应该是个函数 你看看之前运行了什么程序把f用了