HW11 Aliasing Example: Difference between revisions
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
So what happens when you sample as the Nyquist-Shannon thereom suggests, and what happens if you dont? I hate Matlab, but in the self-sacrificing spirit I have towards you, my dear reader, I will use everything in my power including Matlab to clarify things. Hence: |
So what happens when you sample as the Nyquist-Shannon thereom suggests, and what happens if you dont? I hate Matlab, but in the self-sacrificing spirit I have towards you, my dear reader, I will use everything in my power including Matlab to clarify things. Hence: |
||
Here is a sin wave,<math>sin( |
Here is a sin wave,<math>sin(2pit)</math> |
||
Here is that sine wave sampled at points twice it's frequency |
Here is that sine wave sampled at points twice it's frequency |
Revision as of 14:36, 16 November 2007
Aliasing - This is when you're sampling a function, but you don't sample often enough to reconstruct the waveform as it was before.
How often is often enough? Well, the Nyquist-Shannon sampling thereom says twice as much as the highest frequency. To be exact, the theorem states: "Exact reconstruction of a continuous-time baseband signal from its samples is possible if the signal is bandlimited and the sampling frequency is greater than twice the signal bandwidth."
So what happens when you sample as the Nyquist-Shannon thereom suggests, and what happens if you dont? I hate Matlab, but in the self-sacrificing spirit I have towards you, my dear reader, I will use everything in my power including Matlab to clarify things. Hence:
Here is a sin wave,
Here is that sine wave sampled at points twice it's frequency
Here is that sine wave sampled at the same frequency as the wave
Here is the correctly sampled sine wave reconstructed
Here is the insufficiently sampled sine wave reconstructed
So it has the same shape, but as you can see the frequency is alot lower than the original. Basically what not sampling enough does is that it recognizes multiple frequencies as the same frequency, so you lose crucial details in the reproduction of a sound.