请问三次样条插值在matlab中边界问题【求助】
在matlab中,如何设置边界条件,默认的是什么边界条件,当进行外插值的时候,如何判断拟合曲线走向,上升还是下降,(当最后两个点不相等的时候比较好判断,但是当点相等的时候如何判断?)请高手指点谢谢
clc
clear
close all
t = 0:3:18;
tt=length(t);
p=;
pp=length(p);
x =0:0.1:20;
p2=;
y2= interp1(t,p2,x,'spline');
figure;
plot(x,y2,'k-',t,p2,'o');
xlabel('{\itx}','FontSize',10.5,'FontName','Times New Roman');
ylabel('{\ity}','FontSize',10.5,'FontName','Times New Roman');
title('a=0','FontSize',10.5,'FontName','Times New Roman');
grid on;
p3=;
y3= interp1(t,p3,x,'spline');
figure;
plot(x,y3,'k-',t,p3,'o');
xlabel('{\itx}','FontSize',10.5,'FontName','Times New Roman');
ylabel('{\ity}','FontSize',10.5,'FontName','Times New Roman');
title('a=0','FontSize',10.5,'FontName','Times New Roman');
grid on;
页:
[1]