matlab 三次样条插值法作图

2024-12-13 14:40:48
推荐回答(1个)
回答1:

p=[0.388700 0.462342  0.385766  0.369044 0.259913 0.102711 0.022826 0.138508 0.002447 0.234943 0.164503 0.242477 0.299816 0.163045 0.245086 0.085301 0.103518 0.193640];

t=2*pi:-pi/9:pi/9;

polar(t,p)

%以上绘制极坐标图

x=p.*cos(t);

y=p.*sin(t);

x1=2*pi:-pi/180:pi/9;

y1=spline(x,y,x1);%三次样条插值

plot(x1,y1)

%以上插值后绘制直角坐标系下的图形