matlab非线性拟合,y=a/x+b,求a,b其中x =[45.171,47.954,52.633,58.748]y=[1220.671475,1248.136529,1640.870355,1749.759467]最好给出matlab的编程代码,我的matlab是7.0的,如果能运行好有丰厚的追分!
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/27 21:49:13
matlab非线性拟合,y=a/x+b,求a,b其中x =[45.171,47.954,52.633,58.748]y=[1220.671475,1248.136529,1640.870355,1749.759467]最好给出matlab的编程代码,我的matlab是7.0的,如果能运行好有丰厚的追分!
matlab非线性拟合,y=a/x+b,求a,b
其中x =[45.171,47.954,52.633,58.748]
y=[1220.671475,1248.136529,1640.870355,1749.759467]
最好给出matlab的编程代码,我的matlab是7.0的,如果能运行好有丰厚的追分!
matlab非线性拟合,y=a/x+b,求a,b其中x =[45.171,47.954,52.633,58.748]y=[1220.671475,1248.136529,1640.870355,1749.759467]最好给出matlab的编程代码,我的matlab是7.0的,如果能运行好有丰厚的追分!
clear
x =[45.171,47.954,52.633,58.748];
y=[1220.671475,1248.136529,1640.870355,1749.759467];
t=1./x;
[p,S] = polyfit(t,y,1);
clc
plot(x,y,'+',x,polyval(p,t),'-');
legend('origin','fit');
disp(['The values of a and b are:',num2str(p)]);
S.normr
有好多方法的.你提供的数据好像不符合y=a/x+b这个式子.