How to create a traveling sine wave?

조회 수: 5 (최근 30일)
aneps
aneps 2017년 7월 18일
답변: Walter Roberson 2017년 7월 18일
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
Image Analyst
Image Analyst 2017년 7월 18일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by