Professional Documents
Culture Documents
1. Signal Representation:
a. Generate and plot a 3 Hz sine wave with a duration of 2 seconds using MATLAB.
b. Plot a cosine wave with a frequency of 1 kHz and amplitude 0.5 over a time
interval of 0 to 5 milliseconds.
a. Generate and plot the sequence: x(n) = 2^n for -5 ≤ n ≤ 5 using MATLAB.
b. Write a MATLAB program to plot the sequence y(n) = n^2 - 3n + 4 for -10 ≤ n ≤ 10.
4. Sequence Operations:
5. Decomposition of a Sequence:
b. Calculate the odd component of the sequence x(n) using MATLAB and plot it.
a. Generate a sinusoidal signal s[n] with a frequency of 100 Hz and add Gaussian
noise to it using MATLAB.
b. Perform ensemble averaging for the noisy signal with 50 measurements, and
calculate the Mean Squared Error (MSE) and relative error.
b. Determine the energy of the shifted sequence obtained in part (a) using MATLAB.
a. Write MATLAB code to create a 3x3 matrix 'X' with various integer values.
e. Check whether the product of 'X' and its inverse provides the identity matrix.
a. Create a 5x5 matrix 'Y' with random values and access the element at position (3,
4).
b. List the elements in the first three rows and the second column of matrix 'Y.'
a. Given vectors 'C' and 'D' (C = [12, 15, 18, 21], D = [3, 4, 5, 6]), write MATLAB code
to display a plot of 'C' vs. 'D.'
b. Repeat the above using the 'stem' function to create a stem plot.
c. Display three plots as described in part (a) and create subplots for those plots
using different vectors.