%
%
% Optical Imaging and Spectroscopy
%
% David J. Brady
% Duke University
% www.opticalimaging.org
%
% Figure 3.15
%
%
%
% plot of first few splines
%
%
xA=linspace(-3,3,1024);
xS=xA(5)-xA(4);
figure(1);set(gcf,'color','white');
subplot(2,3,1);plot(xA,rect(xA-0.5),'-k');
axis([-3,3 0 1.2]);title('\beta^0(x)');
beta1=conv(rect(xA+0.5),rect(xA-0.5));
beta1=xS*beta1(513:1536);
subplot(2,3,2);plot(xA,beta1,'-k');
axis([-3 3  0 1.2]);
title('\beta^1(x)');
beta2=conv(rect(xA-0.5),beta1);
beta2=xS*beta2(513:1536);
subplot(2,3,3);plot(xA,beta2,'-k');
axis([-3 3 0 1.2]);
title('\beta^2(x)');
beta3=conv(rect(xA+0.5),beta2);
beta3=xS*beta3(513:1536);
subplot(2,3,4);plot(xA,beta3,'-k');
axis([-3 3 0 1.2]);
title('\beta^3(x)');
beta4=conv(rect(xA-0.5),beta3);
beta4=xS*beta4(513:1536);
subplot(2,3,5);plot(xA,beta4,'-k');
axis([-3 3 0 1.2]);
title('\beta^4(x)');
beta5=conv(rect(xA+0.5),beta4);
beta5=xS*beta5(513:1536);
subplot(2,3,6);plot(xA,beta5,'-k');
axis([-3 3 0 1.2]);
title('\beta^5(x)');