Professional Documents
Culture Documents
Task I
3. In order to generate a continuous time signal we require a fundamental frequency fn and a simulated frequency
fs.
4. Firstly, take a continuous time sinusoidal with fundamental frequency of fn=50 Hz & a simulated sampling
frequency of fs=1000Hz.
2𝜋𝑓𝑛𝑡
𝑥(𝑡) = 𝑐𝑜𝑠 ( )
𝑓𝑠
5. Let “t” be an integer index.
6. In order to analyze its frequency spectrum using “fft” following step needs to be taken.
a. Generate a variable “N” indicating the size of frequency components let it be 1200.
b. Now calculate the Fourier transform using “fft”, and use “fftshift” to make the spectrum centered.
7. Use “linspace” to generate Ω-axis.
8. Now by varying the variable “t” & “fn” analyze the changes in the spectrum. As the spectrum is a complex
entity used magnitude, phase, real, and imaginary properties to conclude proper analysis.
Task II
Generate a signal x2(t) with two sinusoids, i.e., the signal now comprises of the sum of two cosine waves with
different frequencies (say 50 Hz and 80 Hz). Repeat steps 5 t 8.
Task III
Implement a unit step function and plot for few values of t. You may take help from using commands like sign
and eps.