% % Filename: example3.m % % Description: M-file demonstrating nonuniqueness of DT sinusoids. % clear; figure(1); clf; % clear memory and figure 1 k = 0:20; % DT values f1a = cos(5.2*pi*k+0.1); % original DT sinusoid 1 f1b = cos(-0.8*pi*k+0.1); % DT sinusoid 1 with fund. freq. f2a = cos(8.2*pi*k-0.2); % original DT sinusoid 2 f2b = cos(0.2*pi*k-0.2); % DT sinusoid 2 with fund. freq. % ** Plot DT sinusoids ** subplot(2,2,1); stem(k,f1a,'filled'); grid; xlabel('k'); ylabel('cos(5.2\pik + 0.1)'); subplot(2,2,2); stem(k,f1b,'filled'); grid; xlabel('k'); ylabel('cos(-0.8\pik + 0.1)'); subplot(2,2,3); stem(k,f2a,'filled'); grid; xlabel('k'); ylabel('cos(8.2\pik - 0.2)'); subplot(2,2,4); stem(k,f2b,'filled'); grid; xlabel('k'); ylabel('cos(0.2\pik -0.2)');MATLAB Plot Generated: