plotting a sine or cosine wave with specific time with specific cycles
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mohanned Al Gharawi
le 15 Fév 2022
Commenté : Mohanned Al Gharawi
le 15 Fév 2022
Hello, hope you're doing well.
I want to plot the attache sine graph with 50 cycles and 33 sec. I have tried several codes but didnt work.
Could someone help me with that?
Thanks in advance.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/895510/image.jpeg)
0 commentaires
Réponse acceptée
Benjamin Thompson
le 15 Fév 2022
By 50 cycles, I understand that you mean that over 33 seconds the signal should have 50 periods.
>> t = 0:(1/50):33;
>> x = 2*sin(2*pi*50/33*t);
>> figure, plot(t, x)
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots 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!