Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following MATLAB code is used to generate a plot of a sinusoidal signal (y(t

ID: 2247901 • Letter: T

Question


The following MATLAB code is used to generate a plot of a sinusoidal signal (y(t)) represented by the MATLAB vector yy. Write a mathematical formula for the signal in standard sinusoidal form (i. e., y(t) = A cos (omega_0 t + phi) with phi element (-pi, pi]) inside the box provided and determine how many periods will be plotted by the MATLAB code (note this may not be an integer) dt = 1/1000: tt = -0.03: dt: 0.05: F_g = 50: yy = real (theta + 3.2 * exp (j +(2 * pi * Fo * (tt - 0.013)))): axis tight;

Explanation / Answer

Fs = 44100; %Sampling frequency in Hz

Ts = 1/Fs; %Sampling time interval in sec

tlen = 0.5; %Signal duration in sec

A = 0.6; %Amplitude of sinusoid

f0 = 1000; %Frequency of sinusoid in Hz

theta = -90; %Phase of sinusoid in degrees

X0 = -0.2; %DC offset of sinusoid

tt = [0:round(tlen*Fs)-1]/Fs; %Time axis

xt = X0 + A*cos(2*pi*f0*tt+(pi/180)*theta);

%DT approximation for x(t)