draw 30 cycles of sinusoid oscillating at 10^6 hz

1 次查看(过去 30 天)
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

更多回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 2-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