***Please help me create a matlab code for Part (B)*** **DATA given:*** A1 = 23;
ID: 2248101 • Letter: #
Question
***Please help me create a matlab code for Part (B)***
**DATA given:***
A1 = 23;
A2 = 1.2*23;
f = 4000;
T = 1/f;
fs = T/25;
tt = -T:fs:T;
tm1 = (37.2/5)*T;
tm2 = -(41.3/13)*T;
X1 = 23*cos(2*pi*(4000)*(tt-tm1));
X2 = 27.6*cos(2*pi*(4000)*(tt-tm2));
m(t) = A1 cos(27(4000) (t-t1)) m(t) = A2 cos (2m (4000)(t-2)) (b) Write one line of MATLAB code that will calculate the magnitude of the sinusoid that is the given by T4 (t) x1(t)-2x2(t) and write one line of MATLAB code that will calculate the phase of x4(t).Explanation / Answer
A1 = 23;
A2 = 1.2*23;
f = 4000;
T = 1/f;
fs = T/25;
tt = -T:fs:T;
tm1 = (37.2/5)*T;
tm2 = -(41.3/13)*T;
X1 = 23*cos(2*pi*(4000)*(tt-tm1));
X2 = 27.6*cos(2*pi*(4000)*(tt-tm2));
magnitude=abs(X1-2*X2);
phas=angle(X1-2*X2) % We can observe pi and 0 are the phase angles
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.