在运行matlab的时候总是出现这个错误:Error using ==> nlinfit at 120 Error evaluating model function

日期:2021-08-21 05:13:51 人气:1

在运行matlab的时候总是出现这个错误:Error using ==> nlinfit at 120 Error evaluating model function

你的程序存在三个问题:
(1) 第7行,[b,R,J]=nlinfit(x,y,@fun,b0); 中@fun后的逗号','不对,应该用英文的,而不是中文的。
(2)你的x和y的长度不同,y少了一个数字。
(3)你的最后一行中应该全部是点乘点除。
修改后的程序如下,可以运行:
function y=fun1
x1=[0.02 0.02 0.06 0.06 0.11 0.11 0.22 0.22 0.56 0.56 1.10 0
    A+
热门评论