MATLAB Answers

How to set axis limit as a function of time with fanimator

2 ビュー (過去 30 日間)
Seonghoon Noh
Seonghoon Noh 2020 年 9 月 11 日
回答済み: Ayush Gupta 2020 年 9 月 21 日
I have an object I would like to center in the figure frame when using fanimator. Say the x-position of the object is simply
x = @(t) 2*t
Then, I would like to be able to use xlim in a way like
hold on;
fanimator(@(t) plot(x(t),y(t)));
xlim([-5 5] + x(t));
ylim([0 3])
hold off;
However, x is just a function handle and t is undefined. How can I achieve this?

  0 件のコメント

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

回答 (1 件)

Ayush Gupta
Ayush Gupta 2020 年 9 月 21 日
I have brought this issue to the notice of our developers. They will investigate the matter further.

  0 件のコメント

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by