필터 지우기
필터 지우기

Comet: How can slow down the animation?

조회 수: 22 (최근 30일)
Raviteja
Raviteja 2011년 3월 22일
>> comet(sin(2*pi*(-50:0.1:50)*(1000)/10000))
Refer to the above code, I want to slow down the animation to know how the wave is creating. Can any one tell me the procedure to slow down the animation?

채택된 답변

Matt Fig
Matt Fig 2011년 3월 22일
I modified my version of COMET to accept another argument. Then in the file I have a default value for this argument of 0. This argument is passed to PAUSE which I put in the main FOR loop that draws the comet. So you could do this, or simply put a pause(.1) in the FOR loops.
If you are not comfortable modifying the MATLAB function, simply copy it to your current directory and modify the copy.
  댓글 수: 2
Raviteja
Raviteja 2011년 3월 22일
Hello Matt,
Here you told "My version", What it is?
Where is your modified file?
Matt Fig
Matt Fig 2011년 3월 22일
I mean that I modified the version of COMET that came with _my_ installation of MATLAB. That is _my_ version. I modified it as described above. You can look at the code for _your_ version by typing:
edit comet
and hitting return. You will see several FOR loops in the file. You could simply put: pause(.1) after each DRAWNOW statement.

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

추가 답변 (0개)

카테고리

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