Plotting cos functions in matlab
35 ビュー (過去 30 日間)
古いコメントを表示
Can someone tell me how you would plot a cos function into matlab so that you can see a few periods of the graph? I am trying to graph
v(t)= 5.6576cos(377t+44.9945)
where the 44.9945 is the angle for the phase. I am also trying to get
v1(t)= 10cos(377t)
for a few periods
0 件のコメント
採用された回答
the cyclist
2015 年 3 月 23 日
編集済み: the cyclist
2025 年 2 月 4 日
omega = 377;
t = (0:0.01:(6*pi))/omega;
v = 5.6576*cos(omega*t+44.9945);
v1 = 10*cos(omega*t);
figure
h = plot(t,v,t,v1);
legend(h,{'v','v1'})
その他の回答 (1 件)
mohammed
2025 年 1 月 20 日
編集済み: Walter Roberson
2025 年 2 月 4 日
t = 0:0.01:(2*pi);
x = cos(t);
y = sin(t);
plot(t,x,'k'); hold on;
plot(t,y,'r-.');
axis([0 2*pi -1.5 1.5])
legend('cos(t)','sin(t)','Location','NorthEast')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Line Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

