怎样用matlab进行数据拟合求出函数关系式 10
x=[2,4,6.5,8,9,9.5,10,11,12.5,15];y=[125.18,195.8,265.21,332.56,322.93,372.63,363.29,...
x=[2,4,6.5,8,9,9.5,10,11,12.5,15];
y=[125.18,195.8,265.21,332.56,322.93,372.63,363.29,374.56,430.18,459.29]; 展开
y=[125.18,195.8,265.21,332.56,322.93,372.63,363.29,374.56,430.18,459.29]; 展开
展开全部
x = [2,4,6.5,8,9,9.5,10,11,12.5,15];
y = [125.18,195.8,265.21,332.56,322.93,372.63,363.29,374.56,430.18,459.29];
p = polyfit(x,y,3);
xx = min(x):.1:max(x);
yy = polyval(p,xx);
plot(x,y,'*');
hold on;
plot(xx,yy,'r');
legend('原始数据','3阶拟合曲线',2);
hold off;
r = vpa(poly2sym(p),2);
title(char(r));
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询