Trying to make a simple animation

2 ビュー (過去 30 日間)
Truman Cassady
Truman Cassady 2018 年 12 月 17 日
回答済み: Mark Sherstan 2018 年 12 月 17 日
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
question.JPG
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!

回答 (1 件)

Mark Sherstan
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

カテゴリ

Help Center および File ExchangeAnimation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by