how can i create an endlesse animation of sine wave
3 views (last 30 days)
Show older comments
Mourchid
on 7 Jan 2016
Commented: Walter Roberson
on 7 Jan 2016
hi friends,
how can i write a matlab script wich creates an endeless animation of sine wave whose amplitudes varies from on to zero then from zero to one and so on. The frequency of the sine wave is 10Hz, th length of the time support for the plot must be one seconde, and i should try different pause times.
thanks in advance.
0 Comments
Accepted Answer
Walter Roberson
on 7 Jan 2016
You would adjust the parameters at the very top of the code, and you would change the "for" to produce values for H0 instead of H1, and you would comment out the assignment of H1 into f()
4 Comments
Walter Roberson
on 7 Jan 2016
In the code in that posting, I always assign to the same index locations in the array f as that task involved constant frequencies. For the frequency to vary over time, you would assign to different locations in f.
If you want different pause times then change the pause() call to reflect the time you want to pause.
More Answers (0)
See Also
Categories
Find more on Animation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!