'hold off' produces second plot in MATLAB Live Script
Mostrar comentarios más antiguos
I find a strange behaviour if I use 'hold on' and 'hold off' in a MATLAB Live Script. I tried out R2022b and R2023b.
If I put all my code into the first cell, it works as expected, i.e. it makes one plot.
But if I call 'hold off' in a new cell, it creates an additional plot.
First cell:
plot([1 2 3 4 5])
hold on;
plot([5 4 3 2 1 ])
Second cell:
hold off
yields TWO plots. Is this a bug? I always thought that 'hold on/off' is just a switch variable...
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!