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

Help Use Matlab to produce two stacked plots. Use the formula p(t) = P[1 + cos(2

ID: 1846483 • Letter: H

Question








Help

Use Matlab to produce two stacked plots. Use the formula p(t) = P[1 + cos(2(omega t + theta v))] + Q [sin(2(omega t + theta v))] for the top plot. Use p(t) = nu (t) i (t) for the bottom plot. Plot over 3 periods of the power waveform, i.e. 0 t 3Tp where Tp = 1/2f P(OH) = 17. 9 + 22.93 cos (2 times 104 pi t + 114.74 2) mu omega. PF(t) = 14.68 + 51.09 cos (2 times 104 pi t + 226.7) mu omega. P(H) = 32.58 + 22.93 cos (2 times 104 pi t + 114.74 2) + + 51.09 cos (2 times 104 pi t + 226.7) mu omega.

Explanation / Answer

Here is the matlab code:



clear all;
clc;

T = 2*pi/2/10000/pi;

L = linspace(0,3*T,1000);

for(i=1:1000)
    P(i) = 17.9 + 22.93*cos(2*10000*pi*L(i) + 114.74*pi/180);
end

subplot(1,3,1);
plot(L,P)
title('Plot1');


T = 2*pi/2/10000/pi;

L = linspace(0,3*T,1000);

for(i=1:1000)
    P(i) = 14.68 +51.09*cos(2*10000*pi*L(i) + 226.7*pi/180);
end

subplot(1,3,2);
plot(L,P)
title('Plot2');

T = 2*pi/2/10000/pi;

L = linspace(0,3*T,1000);

for(i=1:1000)
    P(i) = 32.58 + 22.93*cos(2*10000*pi*L(i) + 114.74*pi/180)+51.09*cos(2*10000*pi*L(i) + 226.7*pi/180);;
end

subplot(1,3,3);
plot(L,P)
title('Plot3');