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));
温馨提示:答案为网友推荐,仅供参考