SLIDE 51 AxisSet(8); legend(’True Signal’,’Reconstructed Signal’); eval(sprintf(’print -depsc AliasingTones%04d;’,fx(c1))); end; return; n = -15:15; t = -5.5:0.01:5.5; xp = rand(size(n)); % Sampled signal wc = pi; T = 1; xr = zeros(size(t)); % Reconstructed signal subplot(3,1,3); for cnt = 1:length(n), st = (wc*T/pi)*xp(cnt)*sinc(wc*(t-n(cnt)*T)/pi); plot(t,st,’g’); hold on; xr = xr + st; end; h = plot(t,xr,’b’,n,xp,’ro’); set(h(2),’MarkerFaceColor’,’r’); set(h(2),’MarkerSize’,2); hold off; xlim([min(t) max(t)]); ylim([-0.2 1.2]); xlabel(’Time (s)’); ylabel(’Signal’); box off; subplot(3,1,2); plot([min(t) max(t)],[0 0],’k:’); hold on; h = stem(n,xp,’r’); set(h(1),’MarkerFaceColor’,’r’); set(h(1),’MarkerSize’,2);
Portland State University ECE 223 Sampling
51