MATLAB Answers

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

2 views (last 30 days)
Seonghoon Noh
Seonghoon Noh on 11 Sep 2020
Answered: Ayush Gupta on 21 Sep 2020
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 Comments

Sign in to comment.

Answers (1)

Ayush Gupta
Ayush Gupta on 21 Sep 2020
I have brought this issue to the notice of our developers. They will investigate the matter further.

  0 Comments

Sign in to comment.

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!