function class17()
%CLASS02  Displays plots for ECE 3500 class
%   CLASS02()  creates all the plots for class lecture notes through the
%   use of Dr. Harley's plotforclass MATLAB function. To get the full
%   results from the lecture notes, this function requires the "export_fig"
%   and "oaxes" functions from the MathWorks File Exchange. 
%
%   INPUTS: none
%
%   OUTPUTS: none
%
%   see also: plot, stem, subplot, figure

close all;

addpath('../matlab/altmany-export_fig-8016f6a')
addpath('../matlab/')
namebase = ['./' ];



% SPECIFY SAMPLING INFORMATION
Ts = 0.01;      % Sampling period
Fs = 1/Ts;      % Sampling rate
ts(1) = 1/2;    % 
ts(2) = 1/2;    % 
fs = 1./ts;     % 

% SPECIFY TIME AND FREQUENCY AXES
t = (-6:Ts:(6-Ts)).'; 
N = length(t);
r = floor(N/2)+1; 
f = fftshift(ifftshift((((1:N)-r)/(N)))*Fs).'; 
df = Fs/N;


n = 1;

%%
% ----------------------------------------
% Sampling: Continous-to-discrete
% ----------------------------------------

% What is Sampling **********
fnc{n} = @stem; 
x{n} = -1:1/1000:1; 
y{n} = nan*ones(1,length(x{n})); y{n}(x{n}==0.6) = 1; y{n}(x{n}==-0.6) = 1;
axis{n} = [-1 1 -1 1];
xlbl{n} = '\omega'; ylbl{n} = 'X(\omega)'; 
figwidth{n} = 6.66; 
marker{n} = {'^'}; markersize{n} = 6; 
xTickSuffix{n} = '\pi';
caption{n} = 'DTFT impulse signal.';
n = n + 1;

fnc{n} = @stem; 
x{n} = -1:1/100:1; 
y{n} = nan*ones(1,length(x{n})); y{n}(x{n}==0.8) = 1; y{n}(x{n}==-0.8) = 1;
axis{n} = [-1 1 -1 1];
xlbl{n} = '\omega'; ylbl{n} = 'H(\omega)'; 
figwidth{n} = 6.66; 
marker{n} = {'^'}; markersize{n} = 6; 
xTickSuffix{n} = '\pi';
caption{n} = 'DTFT impulse signal.';
n = n + 1;


fnc{n} = @stem; 
x{n} = -1:1/100:1; 
y{n} = nan*ones(1,length(x{n})); 
y{n}(abs(x{n}-(mod(0.6+0.8+1,2)-1)) < 0.005) = 1; y{n}(abs(x{n}-(-0.6+0.8))<0.005) = 1; y{n}(abs(x{n}-(0.6-0.8))<0.005) = 1; y{n}(abs(x{n}-(mod(-0.6-0.8-1,-2)+1))<0.005) = 1;
axis{n} = [-1 1 -1 1];
xlbl{n} = '\omega'; ylbl{n} = 'Y(\omega) = X(\omega) circular conv. H(\omega)'; 
figwidth{n} = 6.66; 
marker{n} = {'^'}; markersize{n} = 6; 
xTickSuffix{n} = '\pi';
caption{n} = 'Circular convolution of $X(\omega)$ and $H(\omega)$.';
n = n + 1;



pltopt{n} = [];
figheight{n} = [];
axis{n} = [];
figwidth{n} = [];
hidexticks{n} = [];
hideyticks{n} = [];
marker{n} = [];
markersize{n} = [];
xTickPrefix{n} = [];
xTickSuffix{n} = [];
yTickPrefix{n} = [];
yTickSuffix{n} = [];
LineStyleOrder{n} = [];
ynum{n} = [];
pzplot{n} = [];
roc{n} = [];
myColorMap{n} = [];
caption{n} = [];

for n = 1:length(x)
    plotforclass( 'fnc', fnc{n}, 'x', x{n}, 'y', y{n}, ...
                  'flname', [namebase 'fig' num2str(n, '%03u')], ...
                  'xlbl', xlbl{n}, 'ylbl', ylbl{n}, 'figwidth', figwidth{n}, ...
                  'hidexticks', hidexticks{n}, 'hideyticks', hideyticks{n}, 'marker', marker{n}, ...
                  'markersize', markersize{n}, 'axis', axis{n}, ...
                  'xTickPrefix', xTickPrefix{n}, 'yTickPrefix', yTickPrefix{n}, ...
                  'yTickSuffix', yTickSuffix{n}, 'figheight', figheight{n}, ...
                  'xTickSuffix', xTickSuffix{n}, 'LineStyleOrder', LineStyleOrder{n}, ...
                  'pltopt', pltopt{n}, 'ynum', ynum{n}, 'pzplot', pzplot{n}, 'roc', roc{n}, ...
                  'myColorMap', myColorMap{n}, ...
                  'caption', caption{n}, 'captionFile', [namebase 'caption' num2str(n, '%03u') '.html']);
end



end

