求助matlab中nlinfit问题f=inline('((a(1)-a(4))./(1+(x/a(3).).^a(2)))+a( 4)','a','x');x=0.5:0.1:1.5y=[0,0,0.006,0.175,1.05,1.7,1.85,1.9,1.95,1.975,2]a0=[0,2,1,3]b=nlinfit(x,y,f,a0)plot(x,y,' o',x,f(b,x),'-')有错误Error using nlinfit (line 114
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 11:37:03
求助matlab中nlinfit问题f=inline('((a(1)-a(4))./(1+(x/a(3).).^a(2)))+a( 4)','a','x');x=0.5:0.1:1.5y=[0,0,0.006,0.175,1.05,1.7,1.85,1.9,1.95,1.975,2]a0=[0,2,1,3]b=nlinfit(x,y,f,a0)plot(x,y,' o',x,f(b,x),'-')有错误Error using nlinfit (line 114
求助matlab中nlinfit问题
f=inline('((a(1)-a(4))./(1+(x/a(3).).^a(2)))+a( 4)','a','x');
x=0.5:0.1:1.5
y=[0,0,0.006,0.175,1.05,1.7,1.85,1.9,1.95,1.975,2]
a0=[0,2,1,3]
b=nlinfit(x,y,f,a0)
plot(x,y,' o',x,f(b,x),'-')
有错误Error using nlinfit (line 114)
Error evaluating inline model function.
Caused by:
Error using inlineeval (line 15)
Error in inline expression ==> ((a(1)-a(4))./(1+(x/a(3).).^a(2)))+a( 4)
Error:The input character is not valid in MATLAB statements or expressions.
求助matlab中nlinfit问题f=inline('((a(1)-a(4))./(1+(x/a(3).).^a(2)))+a( 4)','a','x');x=0.5:0.1:1.5y=[0,0,0.006,0.175,1.05,1.7,1.85,1.9,1.95,1.975,2]a0=[0,2,1,3]b=nlinfit(x,y,f,a0)plot(x,y,' o',x,f(b,x),'-')有错误Error using nlinfit (line 114
f=inline('(a(1)-a(4))./(1+(x./a(3)).^a(2))+a(4)','a','x'); % 公式错误,其他没事
x=0.5:0.1:1.5;
y=[0,0,0.006,0.175,1.05,1.7,1.85,1.9,1.95,1.975,2];
a0=[0,2,1,3];
b=nlinfit(x,y,f,a0);
plot(x,y,'o',x,f(b,x),'-');