How to generate a 256 point sine wave of frequency 1Hz
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Discrete Fourier and Cosine Transforms dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!