function class12()
%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 = ['./' ];

Ts = 1/100; Fs = 1/Ts;

n = 1;


fnc{n} = @plot; x{n} = -1:1/200:1; y{n} = abs((1+cos(pi*x{n})).*exp(-1j*2*(x{n}*pi)));
xlbl{n} = '\omega'; ylbl{n} = '|X(\omega)|';  axis{n} = [-1 1 0 2]; figwidth{n} = 6.66666;
xTickSuffix{n} = '\pi';
caption{n} = 'Magnitude of $X(\omega) = (1 + \cos(\pi \omega)) e^{-j \omega}$';
n = n + 1; 

fnc{n} = @plot; x{n} = -1:1/200:1; y{n} = angle((1+cos(pi*x{n})).*exp(-1j*2*(x{n}*pi)));
xlbl{n} = '\omega'; ylbl{n} = '\angle X(\omega)';  axis{n} = [-1 1 -pi pi]; figwidth{n} = 6.66666;
xTickSuffix{n} = '\pi';
caption{n} = 'Phase of $X(\omega) = (1 + \cos(\omega)) e^{-j 2 \omega}$';
n = n + 1; 



fnc{n} = @plot; x{n} = -1:1/200:1; y{n} = abs((1+cos(pi*x{n})).*exp(-1j*2*(x{n}*pi)));
xlbl{n} = '\omega'; ylbl{n} = '|X(\omega)|';  axis{n} = [-1 1 0 2]; figwidth{n} = 3.3333;
xTickSuffix{n} = '\pi';
caption{n} = 'Magnitude of $X(\omega) = (1 + \cos(\\omega)) e^{-j \omega}$';
n = n + 1; 

fnc{n} = @plot; x{n} = -1:1/200:1; y{n} = angle((1+cos(pi*x{n})).*exp(-1j*2*(x{n}*pi)));
xlbl{n} = '\omega'; ylbl{n} = '\angle X(\omega)';  axis{n} = [-1 1 -pi pi]; figwidth{n} = 3.3333;
xTickSuffix{n} = '\pi';
caption{n} = 'Phase of $X(\omega) = (1 + \cos(\omega)) e^{-j 2 \omega}$';
n = n + 1; 

fnc{n} = @plot; x{n} = -1:1/200:1; y{n} = abs(1-(1*((x{n} > -0.25) - (x{n} > 0.25))).*exp(+1j*2*(x{n}*pi)));
xlbl{n} = '\omega'; ylbl{n} = '|H(\omega)|';  axis{n} = [-1 1 0 2]; figwidth{n} = 3.3333;
xTickSuffix{n} = '\pi';
caption{n} = 'Magnitude of $H(\omega)$';
n = n + 1; 

fnc{n} = @plot; x{n} = -1:1/200:1; y{n} = angle(1-(1*((x{n} > -0.25) - (x{n} > 0.25))).*exp(+1j*2*(x{n}*pi)));
xlbl{n} = '\omega'; ylbl{n} = '\angle H(\omega)';  axis{n} = [-1 1 -pi pi]; figwidth{n} = 3.3333;
xTickSuffix{n} = '\pi';
caption{n} = 'Phase of $H(\omega)$';
n = n + 1; 



fnc{n} = @plot; x{n} = -1:1/200:1; y{n} = y{n-4}.*y{n-2};
xlbl{n} = '\omega'; ylbl{n} = '|Y(\omega)|';  axis{n} = [-1 1 0 3]; figwidth{n} = 3.3333;
xTickSuffix{n} = '\pi';
caption{n} = 'Magnitude of $Y(\omega) = H(\omega) X(\omega)$';
n = n + 1; 

fnc{n} = @plot; x{n} = -1:1/200:1; y{n} = y{n-4} + y{n-2};
xlbl{n} = '\omega'; ylbl{n} = '\angle Y(\omega)';  axis{n} = [-1 1 -pi pi]; figwidth{n} = 3.3333;
xTickSuffix{n} = '\pi';
caption{n} = 'Phase of $Y(\omega) = H(\omega) X(\omega)$';
n = n + 1; 


pltopt{n} = [];
figheight{n} = [];
axis{n} = [];
figwidth{n} = [];
hideticks{n} = [];
marker{n} = [];
markersize{n} = [];
xTickPrefix{n} = [];
xTickSuffix{n} = [];
yTickPrefix{n} = [];
yTickSuffix{n} = [];
LineStyleOrder{n} = [];
ynum{n} = [];
pzplot{n} = [];
pzzplot{n} = [];
roc{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}, ...
                  'hideticks', hideticks{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}, ...
                  'pzzplot', pzzplot{n}, 'roc', roc{n}, 'caption', caption{n},...
                  'captionFile', [namebase 'caption' num2str(n, '%03u') '.html']);
end


end

