animate for a given time

3 ビュー (過去 30 日間)
am
am 2019 年 4 月 30 日
編集済み: am 2019 年 5 月 1 日
Hello,
I need to animate a pendulum for about 5 seconds and then plot the solution for second = 0, 1, 2, 3 and 4.
I tried to use tic toc function but I am not sure this is working. Can anyone have a look and help me to implement a function that picks up the right t for the times I need?

回答 (1 件)

Kevin Phung
Kevin Phung 2019 年 4 月 30 日
tic toc is used to see how long processes take in your script. This is not relevant to what you are trying to do.
You should take a look at this documentation:
This should have everything you'll need.
  1 件のコメント
am
am 2019 年 5 月 1 日
編集済み: am 2019 年 5 月 1 日
Hi, I dont need to plot in a first step. I need to isolate the right indexes for 1,2,3 and 4 seconds.
As i wrote in my code, I need to save the right t in an array, and they get the subsequent values from a table.
There is nothing in drawnow that achieves this I believe.

サインインしてコメントする。

カテゴリ

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