Trying to make a simple animation
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
I am wanting to create a plot that shows a cursor moving along the line of an ellipse with respect to a certain time frame. I was able to use this

to acquire a red dot that moves through each point along the shape, but how could I incorporate a linear time rate of my choosing. I'm pretty sure by default the program runs 12 frames per second. I need maybe like 3 or 4 fps.
-Thank you!
댓글 수: 0
답변 (1개)
Mark Sherstan
2018년 12월 17일
Run something like this:
tic
loopTimer = toc
... % Loop start
while ((toc - loopTimer < 3); end % Make sure you actually hit 3 seconds
% Your function here...
loopTimer = toc
... % Loop end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Animation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!