Plotting a graph to show the variation in time of a current
5 ビュー (過去 30 日間)
I have the following current with the expression:
i =13*sqrt(2)*sqrt(2)*sin(2* pi*40*t-8.13)
and i want to plot the variation in time over 1.5 period.
I tried something i have seen on the cummunity:
period = 1/40
Periods = 1.5 * period
t = linspace(0,Periods, 1000);
i =13*sqrt(2)*sqrt(2)*sin(2* pi * t/period-8.13);
plot(t, i, 'b-', 'LineWidth', 2);
and it shows this graph:
but the correct graph i know is this one:
(the blue line is for the current i wrote above)
Can somebody help me write the correct code to obtain the correct results?
回答 (1 件)
Sameer Pujari 2022 年 10 月 25 日
Hi Eduard Mihai
Upon reproducing your code, I understood that the issue you are facing is due to not converting the phase angle from degree's to radian's
Use of "sin" in MATLAB returns sine of argument in radians. Converting phase from degree to radians gives the desired correct graph
i =13*sqrt(2)*sqrt(2)*sin(2* pi*40*t-8.13*pi/180)
I hope this information helps you!