matlab利用描点画平滑曲线

 clear;
x1=-0.05:0.03:0.2;
x2=0:0.05:0.35;
y1(:,1)=0;y1(:,2)=0;y1(:,3)=0.6;y1(:,4)=0.86;y1(:,5)=0.93;y1(:,6)=0.97;y1(:,7)=0.980;y1(:,8)=0.99;y1(:,9)=1.0;
y2(:,1)=0;y2(:,2)=0.1;y2(:,3)=0.38;y2(:,4)=0.68;y2(:,5)=0.87;y2(:,6)=0.92;y2(:,7)=0.98;y2(:,8)=1.0;
values = spcrv([[x1(1) x1 x1(end)];[y1(1) y1 y1(end)]],3);
plot(values(1,:),values(2,:), 'r--');
hold on;
values = spcrv([[x2(1) x2 x2(end)];[y2(1) y2 y2(end)]],3);
plot(values(1,:),values(2,:), 'b');
grid on;
set(gca,'FontSize',10, 'FontName','Times New Roman');
xlabel('Path correlation ','fontsize',12);
ylabel('CDF','fontsize',12);
title('Correlation between two path ','fontsize',12);
legend('False match','True match');

图如下:

 matlab利用描点画平滑曲线



你可能感兴趣的:(matlab利用描点画平滑曲线)