哪位高手帮我用MATLAB拟合一条多项式的曲线,感激不尽。
六个点分别为:(0,100919)(7.643,100970)(13.163,101014)(15.994,101093)(18.825,101163)(22.930,1...
六个点分别为:
(0,100919)
(7.643,100970)
(13.163,101014)
(15.994,101093)
(18.825,101163)
(22.930,101261) 展开
(0,100919)
(7.643,100970)
(13.163,101014)
(15.994,101093)
(18.825,101163)
(22.930,101261) 展开
展开全部
>>A=[0,100919;7.643,100970;13.163,101014;15.994,101093;18.825,101163;22.930,101261];
>>x=A(1:6,[1]);
>>y=A(1:6,[2]);
>>polyfit(x,y,2);
ans=
0.654336557 -0.006911826 100920.9
f(x)=0.654337x²-0.006912x+100920.9
>>polyfit(x,y,3);
ans=
0.001854612 0.589269026 0.548632607 100920.6
f(x)=0.001854612x³+0.589269026x²+0.548632607x+100920.6
>>x=A(1:6,[1]);
>>y=A(1:6,[2]);
>>polyfit(x,y,2);
ans=
0.654336557 -0.006911826 100920.9
f(x)=0.654337x²-0.006912x+100920.9
>>polyfit(x,y,3);
ans=
0.001854612 0.589269026 0.548632607 100920.6
f(x)=0.001854612x³+0.589269026x²+0.548632607x+100920.6
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询