How to generate a 256 point sine wave of frequency 1Hz
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Chamira Wickramasinghe
am 11 Feb. 2016
Bearbeitet: Chamira Wickramasinghe
am 11 Feb. 2016
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Discrete Fourier and Cosine Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!