How to generate a 256 point sine wave of frequency 1Hz

4 ビュー (過去 30 日間)
Chamira Wickramasinghe
Chamira Wickramasinghe 2016 年 2 月 11 日
編集済み: Chamira Wickramasinghe 2016 年 2 月 11 日
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 件)

カテゴリ

Help Center および File ExchangeDiscrete Fourier and Cosine Transforms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by