draw 30 cycles of sinusoid oscillating at 10^6 hz

1 回表示 (過去 30 日間)
Hessa Alhajri
Hessa Alhajri 2021 年 4 月 23 日
コメント済み: VBBV 2021 年 4 月 26 日
i was trying to plot 30 cycles of a sinusoid oscillating at 10^6, so I tried with following code
>> fs=10^6;
>> T=1/fs;
>> tt=0:0.1:30*T;
>> m=cos(2*pi*fs*tt);
>> plot(tt,m)
but no graph is appear!

採用された回答

VBBV
VBBV 2021 年 4 月 23 日
%f true
fs=10^6;
T=1/fs;
tt=0:0.1*T:30*T;
m=cos(2*pi*fs*tt);
plot(tt,m)
Try this
  2 件のコメント
Hessa Alhajri
Hessa Alhajri 2021 年 4 月 23 日
thank you
VBBV
VBBV 2021 年 4 月 26 日
Thanks means accepting the answer if it worked well.

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

その他の回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2021 年 4 月 23 日
change to this line
tt=0:T/100:30*T

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by