标签:matlab fit val polyval 代码 plot 多项式 mat hold
x=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
y=[1.2, 3, 4, 4, 5, 4.7, 5, 5.2, 6, 7.2]
p2=polyfit(x,y,2)
p3=polyfit(x,y,3)
y2=polyval(p2,x)
y3=polyval(p3,x)
hold on
plot(x,y2,"r")
plot(x,y3,"b")
plot(x,y,"*")
标签:matlab fit val polyval 代码 plot 多项式 mat hold
原文地址:https://www.cnblogs.com/shunguo/p/11399354.html