Plotting continious-time signal

1 回表示 (過去 30 日間)
Cagatay Aslan
Cagatay Aslan 2019 年 10 月 28 日
コメント済み: Cagatay Aslan 2019 年 10 月 28 日
Hi, I'm a beginner in Matlab and I'd like to plot the following continious time sinusoidal x(t) = sinwt where w= pi, 3*pi/2, 2*pi. Can anybody help me how to plot this. My first attempt is as following:
t=[0:10];
subplot(2,2,1)
x1 = cos(pi*t);
plot(t,x1)
subplot(2,2,2)
x2 = cos((3*pi/2)*t);
plot(t,x2)
subplot(2,2,3)
x3 = cos(2*pi*t);
plot(t,x3)
Am I correct? Any help would be appreciated.

採用された回答

Daniel M
Daniel M 2019 年 10 月 28 日
編集済み: Daniel M 2019 年 10 月 28 日
That's correct. You plotted three signals, with angular frequency of pi, 3/2*pi, and 2*pi rad/s. This corresponds to frequency of 0.5, 0.75, and 1 Hz.
Note, you might want to make increment t using a smaller step size, so the plots are smoother. Try:
t = 0:0.001:10;
  3 件のコメント
Daniel M
Daniel M 2019 年 10 月 28 日
You sure can, but again, give yourself more samples.
n = 0:0.1:5;
Cagatay Aslan
Cagatay Aslan 2019 年 10 月 28 日
Many thanks sir.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by