入门MATLAB2020b,想求解参量变化的非线性方程组,出现如下报错,请问我该如何处理,感谢
% parpool
fun = @(x,a) exp(x)+x^a+x^(x^(1/2));
a = linspace(0,2,2000); result = zeros(1,2000); x = 0;
for i=1:2000
result(1,i) = fsolve(fun,[x,a(i)])
end
% plot(a,result)
入门MATLAB2020b,想求解参量变化的非线性方程组,出现如下报错,请问我该如何处理,感谢
% parpool
fun = @(x,a) exp(x)+x^a+x^(x^(1/2));
a = linspace(0,2,2000); result = zeros(1,2000); x = 0;
for i=1:2000
result(1,i) = fsolve(fun,[x,a(i)])
end
% plot(a,result)