x=[0.20,2,4.01,5.99,8.08,9.98,11.96,14.00,15.99,18.00,19.98,21.98,23.99,25.97,28.01,30.00,32.04,33.99,35.98,37.99,39.99,42.00,43.99,45.99];y=[37.46,41.36,43.96,44.56,42.80,38.44,29.79,17.07,6.12,5.03,12.87,23.19,31.74,37.89,42.12,44.22,44.52,42.75,37.95,28.44,15.52,5.17,5.79,14.55];
subplot(2,1,1);
plot(x,y,’*’);
xlabel(‘刻度d(mm)’);
ylabel(‘指示I’);
title(‘原始图像’);
values=spcrv([[x(1) x x(end)];[y(1) y y(end)]],3);
subplot(2,1,2);
plot(values(1,:),values(2,:),’b’);
xlabel(‘刻度d(mm)’);
ylabel(‘指示I’);
title(‘拟合图像’);