How to generate a 256 point sine wave of frequency 1Hz
4 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
Please help me to generate a 256 point sine wave of frequency 1Hz sampled at a frequency of 50Hz. And I need to plot it for 5 secs. This is the code I wrote but I don't know whether it's correct or not.
f=1;
Fs1 = 50;
Ts1=1/Fs1;
t1=[0:Ts1:5];
W1=sin(2*pi*f*t1);
plot(t1,W1,'r-')
0 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!