我有一组数据,我想在 matlab 中使用曲线拟合工具箱为数据绘制样条图。我已经这样做了:
x =
Columns 1 through 10
0 1.2500 1.8800 2.5000 5.0000 6.2500 6.8800 7.1900 7.5000 10.0000
Columns 11 through 13
12.5000 15.0000 20.0000
y =
Columns 1 through 10
-85.9300 -78.8200 -56.9500 -34.5600 -33.5700 -39.6400 -41.9600 -49.2800 -66.6000 -66.6100
Columns 11 through 13
-59.1600 -48.7800 -41.5300
cftool
[breaks,coefs,l,k,d] = unmkpp(pp)
breaks =
Columns 1 through 10
0 1.2500 1.8800 2.5000 5.0000 6.2500 6.8800 7.1900 7.5000 10.0000
Columns 11 through 13
12.5000 15.0000 20.0000
coefs =
-4.8535 30.6309 -25.0170 -85.9300
-4.8535 12.4304 28.8095 -78.8200
-11.9651 3.2573 38.6927 -56.9500
3.0330 -18.9977 28.9337 -34.5600
-0.2294 3.7501 -9.1852 -33.5700
-11.6351 2.8899 -0.8852 -39.6400
-68.6157 -19.1004 -11.0978 -41.9600
130.6350 -82.9130 -42.7220 -49.2800
-6.3971 38.5776 -56.4659 -66.6000
1.6010 -9.4008 16.4760 -66.6100
-0.2967 2.6064 -0.5099 -59.1600
-0.2967 0.3814 6.9597 -48.7800
l =
12
k =
4
d =
1
如果我错了,请纠正我,该命令是否[breaks,coefs,l,k,d] = unmkpp(pp)
能够帮助我从我获得的样条图中获得分段方程?如果是这样,我能否知道我如何理解该命令,以便我可以利用自己的优势和 coefs、k、d 中的值的重要性。谢谢!基本上我希望能够获得一个方程/方程来描述我通过曲线拟合工具箱获得的样条图。任何帮助将不胜感激!