matlab lsqcurvefit函数
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/07/18 03:07:00
matlab lsqcurvefit函数
function T = nihehanshu( x,xdata )
T = 1./(x(1)*xdata + repmat(x(2),1,10) ) + repmat(x(3),1,10) ;
end
>> xdata = [82 38 19.8 12.9 8.5 6.1 3.7 2.5 1.73 1.14];
>> ydata = [-18 -8 5 16 25 33 46 55 66 80];
>> x0 = [0,0,0];
>> [x,resnorm] = [@nihehanshu,x0,xdata,ydata]
Error using ==> horzcat
The following error occurred converting from double to function_handle:
Error using ==> function_handle
Too many output arguments.
x0改成 x0 = [1,1,1];
function T = nihehanshu( x,xdata )
T = 1./(x(1)*xdata + repmat(x(2),1,10) ) + repmat(x(3),1,10) ;
end
>> xdata = [82 38 19.8 12.9 8.5 6.1 3.7 2.5 1.73 1.14];
>> ydata = [-18 -8 5 16 25 33 46 55 66 80];
>> x0 = [0,0,0];
>> [x,resnorm] = [@nihehanshu,x0,xdata,ydata]
Error using ==> horzcat
The following error occurred converting from double to function_handle:
Error using ==> function_handle
Too many output arguments.
x0改成 x0 = [1,1,1];
你用的是什么版本的matlab?
确定是这种用法么?
[x,resnorm] = [@nihehanshu,x0,xdata,ydata]
这句显然不对啊,你用的什么工具箱都没体现出来,怎么算.
我的是R2006a
改成[x,resnorm] = lsqcurvefit(@nihehanshu,x0,xdata,ydata)
就可以运行了
建议用工具箱之前先help一下用法以后
再问: 没问题了 谢谢你
确定是这种用法么?
[x,resnorm] = [@nihehanshu,x0,xdata,ydata]
这句显然不对啊,你用的什么工具箱都没体现出来,怎么算.
我的是R2006a
改成[x,resnorm] = lsqcurvefit(@nihehanshu,x0,xdata,ydata)
就可以运行了
建议用工具箱之前先help一下用法以后
再问: 没问题了 谢谢你
matlab lsqcurvefit 函数的使用
matlab中lsqcurvefit函数报错问题
如何使用matlab中的lsqcurvefit函数
lsqcurvefit在matlab中拟合函数问题
matlab的lsqcurvefit函数做幂函数拟合出错
关于matlab中lsqcurvefit函数应用出错的问题
matlab中高斯拟合函数lsqcurvefit初始参数怎么设置
lsqcurvefit在matlab中拟合多元函数问题
matlab中lsqcurvefit函数拟合问题,有懂的请帮下忙,
matlab中使用lsqcurvefit函数拟合老是报错,
MATLAB中的lsqcurvefit(fun,a0,x,y)函数中的a0代表什么
Matlab 曲线拟合 lsqcurvefit函数问题,老是运行有错,但自己手动拟合的曲线拟合性很好,求大神帮忙解决