% plot_SamplingDemo - Sample three sinusoidal signals to 
%                     demonstrate the impact of sampling

%% set parameters
fs  = 10;
dur = 10;

%% generate signals
tt  = 0:1/fs:dur;
xx1 = cos(2*pi*tt+pi/4);
xx2 = cos(2*pi*9*tt-pi/4);
xx3 = cos(2*pi*11*tt+pi/4);

%% plot
plot(tt,xx1,':o',tt,xx2,':x',tt,xx3,':+');
xlabel('Time (s)')
grid
legend('f=1','f=9','f=11','Location','EastOutside')

%% Store name of script for automated figure generation
ScriptName = mfilename;
