Clear Filters
Clear Filters

Live code doesn't regenerate figures when rerun

39 views (last 30 days)
I'm going through programming in live script, and I'm generating plots. Sometimes I need to go back and change the equation I was plotting, and when I rerun the code, the plot is grayed out and doesn't regenerate when run, regardless if I use Run, Run to End, etc. I have to hit them all a few times, and it will randomly regenerate everything, or maybe just some plots and not others. Even clear, clc, close commands don't seem to fix this issue.
Is there a particular way to tell matlab to regenerate all plots when run? Each one already sits as a dedicated figure, and I'm rerunning all sections...
Un-regenerated plot above a regenerated plot:

Answers (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 17 Oct 2023
The simulation speed is very much dependent on MATLAB version. E.g. SEE thread shows that big difference.
With the Live Editor, if you have a bunch of plots to be update in every run (if you hit Run button), you need to be a bit patient. Maybe don't need to run all cells in every update of your code. Therefore executing the code in a cell mode can save significant time.

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!