Time for the graph at http://i238.photobucket.com/albums/ff228/j...ots/imaging.jpg
This shows in the first plot a sine wave a bit below fs/2.
As you go down, the red is the sum of the first 2, next 2, next 2 and next ?100? I think (the plot was made with a different script may years ago) images, and the resulting waveform with the images, all of them over fs/2, is shown behind the red waveform.
Notice how only images cause it to square off.
I'm not going to figure out the amplitudes for a triangle right here and now today (it should be easy, of course) but you're welcome to take script below, which is an enhanced version of the one that made the plot above, fix it, and pot that here.
But I think this makes the point that drawing striaght lines around plots of incividual samples doesn't show what a lot of people think it does.
clear all;
close all;
fclose all;
clc;
len=8192;
f0= 2*pi* .4;
fs=2*pi;
overs=512;
w0=f0/overs;
ws=fs/overs;
ax=[ 1 len -1.5 1.5];
iter(1:len)=(0:len-1);
t=w0/ws*pi;
amp=sin(t)/t;
x(1:len)=amp*cos(iter*w0);
subplot(5,1,1)
plot(x,'k');
axis( ax );
# first image pair
wl=ws-w0;
wh=ws+w0;
tmp(1:len)=0;
t=wl/ws*pi;
amp=sin(t)/t;
tmp=tmp+amp*cos(iter*wl);
t=wh/ws*pi;
amp=sin(t)/t;
tmp=tmp+amp*cos(iter*wh);
subplot(5,1,2)
x=x+tmp;
plot(x,'k');
axis(ax);
hold on;
plot(tmp,'r');
hold off;
wl=2*ws-w0;
wh=2*ws+w0;
tmp(1:len)=0;
t=wl/ws*pi;
amp=sin(t)/t;
tmp=tmp+amp*cos(iter*wl);
t=wh/ws*pi;
amp=sin(t)/t;
tmp=tmp+amp*cos(iter*wh);
subplot(5,1,3)
x=x+tmp;
plot(x,'k');
axis(ax);
hold on;
plot(tmp,'r');
hold off
wl=3*ws-w0;
wh=3*ws+w0;
tmp(1:len)=0;
t=wl/ws*pi;
amp=sin(t)/t;
tmp=tmp+amp*cos(iter*wl);
t=wh/ws*pi;
amp=sin(t)/t;
tmp=tmp+amp*cos(iter*wh);
subplot(5,1,4)
x=x+tmp;
plot(x,'k');
axis(ax);
hold on;
plot(tmp,'r');
hold off;
tmp(1:len)=0;
for ii=4:1000
wl=ii*ws-w0;
wh=ii*ws+w0;
t=wl/ws*pi;
amp=sin(t)/t;
tmp=tmp+amp*cos(iter*wl);
t=wh/ws*pi;
amp=sin(t)/t;
tmp=tmp+amp*cos(iter*wh);
end
subplot(5,1,5)
x=x+tmp;
plot(x,'k');
axis(ax);
hold on;
plot(tmp,'r');
hold off;