function class29()
%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(genpath('../matlab/'))
namebase = ['./'];

n = 1;


%%
% ----------------------------------------------------------------------
% TYPES OF SIGNALS
% ----------------------------------------------------------------------

% Ideal Filter **********
fnc{n} = @plot; x{n} = -1:0.001:1;  y{n} = (x{n} > -0.5) - (x{n} > 0.5); 
xlbl{n} = '\omega'; ylbl{n} = 'H(\omega)'; xTickSuffix{n} = '\pi';
caption{n} = 'Ideal low-pass filter frequency response';
n = n + 1;

fnc{n} = @stem; x{n} = -10:10;  y{n} = sin(0.5*pi*x{n})./(pi*x{n}); y{n}(x{n}==0) = 0.5;
xlbl{n} = 'n'; ylbl{n} = 'h[n]'; 
caption{n} = 'Ideal low-pass filter impulse response';
n = n + 1;


% LOW TO HIGH
fnc{n} = @plot; x{n} = -1:0.001:1;  y{n} = (x{n} > 0.5) - (x{n} > 1.1) + (x{n} > -1.1) - (x{n} > -0.5); 
xlbl{n} = '\omega'; ylbl{n} = 'H(\omega)'; xTickSuffix{n} = '\pi';
caption{n} = 'Ideal high-pass filter frequency response';
n = n + 1;

fnc{n} = @stem; x{n} = -10:10;  y{n} = sin(0.5*pi*x{n})./(pi*x{n}); y{n}(x{n}==0) = 0.5;
y{n} = y{n}.*cos(pi.*x{n});
xlbl{n} = 'n'; ylbl{n} = 'h[n]'; 
caption{n} = 'Ideal high-pass filter impulse response';
n = n + 1;



% Ideal Filter **********
fnc{n} = @plot; x{n} = -1:0.001:1;  y{n} = (x{n} > -0.25) - (x{n} > 0.25); 
xlbl{n} = '\omega'; ylbl{n} = 'H(\omega)'; xTickSuffix{n} = '\pi';
caption{n} = 'Ideal low-pass filter frequency response';
n = n + 1;

fnc{n} = @stem; x{n} = -10:10;  y{n} = sin(0.25*pi*x{n})./(pi*x{n}); y{n}(x{n}==0) = 0.25;
xlbl{n} = 'n'; ylbl{n} = 'h[n]'; 
caption{n} = 'Ideal low-pass filter impulse response';
n = n + 1;

% LOW TO BANDPASS
fnc{n} = @plot; x{n} = -1:0.001:1;  y{n} = (x{n} > 0.25) - (x{n} > 0.75) + (x{n} > -0.75) - (x{n} > -0.25); 
xlbl{n} = '\omega'; ylbl{n} = 'H(\omega)'; xTickSuffix{n} = '\pi';
caption{n} = 'Ideal band-pass filter frequency response';
n = n + 1;

fnc{n} = @stem; x{n} = -10:10;  y{n} = sin(0.25*pi*x{n})./(pi*x{n}); y{n}(x{n}==0) = 0.25;
y{n} = 2*y{n}.*cos((pi/2).*x{n});
xlbl{n} = 'n'; ylbl{n} = 'h[n]'; 
caption{n} = 'Ideal band-pass filter impulse response';
n = n + 1;



axis{n}        = [];
figwidth{n}    = [];
hidexticks{n}  = [];
hideyticks{n}  = [];
marker{n}      = [];
markersize{n}  = [];
xTickPrefix{n} = [];
xTickSuffix{n} = [];
yTickPrefix{n} = [];
yTickSuffix{n} = [];
xTick{n}       = [];
yTick{n}       = [];
caption{n}     = [];

figwidth{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}, 'marker', marker{n}, ...
                  'markersize', markersize{n}, 'axis', axis{n}, ...
                  'xTickPrefix', xTickPrefix{n}, 'xTickSuffix', xTickSuffix{n}, ...
                  'yTickPrefix', yTickPrefix{n}, 'yTickSuffix', yTickSuffix{n}, ...
                  'hideyticks', hideyticks{n}, 'xTick', xTick{n}, 'yTick', yTick{n}, ...
                  'caption', caption{n}, 'captionFile', [namebase 'caption' num2str(n, '%03u') '.html']);
	
    
end


end

