loading data before displaying it? is it possible?

2 views (last 30 days)
Hi I am making a simulation of a rocket heading towards a target with things like wind resistance included and when running it the display slows down and keeps slowing down even more until finished.
my question is.... Is it possible to load several lines of code before executing them that way no display lag will ensue?

Accepted Answer

Walter Roberson
Walter Roberson on 4 Jan 2012
Often when there is a progressive slowdown in displaying, it is because there is a "hold on" in effect that is leading to accumulation of graphics objects.
It is not possible to eliminate display lag in MATLAB.
Display lag can be reduced by re-using graphic objects (updating their properties using set()) instead of replacing them with new objects.
Display lag can be reduced by setting an object (e.g., axis) visibility to 'off', making changes to the object, and then setting the object visible again.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!