I am trying to verify for myself that aliasing actually makes it impossible to distinguish the "real" and the aliased frequency. What I have done it set the sampling rate to 20 Hz and created two sine wave with 2 Hz and 18 Hz. As far as I understand the 18 Hz signal should alias to a 2 Hz signal when the sampling rate is 20 Hz.
Matlab code:
t = [0:0.05:1]; //20Hz sampling
a = sin(2*pi*2*t); //2Hz sine wave
b = sin(2*pi*18*t); //18Hz sine wave
plot(t, a);
hold on;
plot(t, b, 'red');
The plot looks like this:
I can see that both sine waves are equal, but 180 degrees out of phase. I wonder if there is something to it or if it's just Matlab drawing through the points in opposite ways?