Lab03 Sampling Fall2019
Lab03 Sampling Fall2019
Objective:
In today’s lab we will take a continuous time signal and sample it out with a fixed sampling time period and
analyze its frequency response at each point.
Commands to be used:
• plot • real • exp • imag • tf2zp
• freqz • diff • sin/cos • hold on/off
Task I
3. Firstly, take a continuous time sinusoidal with a cutoff frequency of 50 Hz with a simulated sampling frequency
of 1000. Analyze its frequency spectrum using “fft”.
4. Generate a square wave of frequency “2fn”.
5. Analyze its frequency spectrum using “fft”.
6. Take its absolute derivative of square wave resulting in impulses thus generating impulse-train, followed by
step 5. Normalize it.
7. Now multiply the impulse train with the sinusoidal, thus generating a semi discrete signal x(nT). Repeat step 5
for analysis.
8. Now use a loop and pick all samples from x(nT) where the impulse train is 1.
9. Once again repeat step 5.
10. Now generate a square wave with frequency “3fn/2” and “5fn” and repeat step 5 to 9 for both the frequencies.
Questions:
1. Provide your analysis for the changed frequency of Impulse train.
2. Explain if you observe under or over sampling.