Borrar filtros
Borrar filtros

How to create a traveling sine wave?

7 visualizaciones (últimos 30 días)
aneps
aneps el 18 de Jul. de 2017
Respondida: Walter Roberson el 18 de Jul. de 2017
I want to make create a traveling sine wave with with a specific frequency and wavelength moving with a specific speed v. How can I make the code? I can make a sine wave easily but don't know how to write code for traveling wave! Thank you.
  1 comentario
Image Analyst
Image Analyst el 18 de Jul. de 2017
What do you mean by traveling? Like you want the sine wave to be animated like it's slowly traveling to the right or something? If so, just change the phase and replot it. Put a pause() in to change the speed.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 18 de Jul. de 2017
For R2014b onwards, use animatedline with a limited number of points to be retained. drawnow() or pause() after you update the points.

Categorías

Más información sobre Animation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by