clear;
close all;
%
x = 0:.2:12;
y1 = bessel(1,x); y2 = bessel(2,x); y3 = bessel(3,x);
%
figure(1);
subplot(2,2,1);
%
h = plot(x,y1,x,y2,x,y3);
%
set(h,'LineWidth',2,{'LineStyle'},{'--';':';'-.'});
set(h,{'Color'},{'r';'g';'b'});
axis([0 12 -.5 1]); set(gca,'XTick',[0 2 4 6 8 10 12]);
grid on
%
xlabel('Time'), ylabel('Amplitude')
legend(h,'1st','2nd','3rd');
title('Plots of Bessel functions');
[y,ix] = min(y1);
text(x(ix),y,'Minimum of 1st \rightarrow',...
'HorizontalAlignment','right')
%
subplot(2,2,2)
plot(x,y1,'r--','LineWidth',2)
title('Function 1st')
subplot(2,2,3)
plot(x,y2,'g:','LineWidth',2)
title('Function 2nd')
subplot(2,2,4)
plot(x,y3,'b-.','LineWidth',2)
title('Function 3rd')
%
print -deps fig1.eps
