Borrar filtros
Borrar filtros

How can I change animation speed in a plot?

3 visualizaciones (últimos 30 días)
Hülya Sukas
Hülya Sukas el 9 de Nov. de 2019
Comentada: Anmol Dhiman el 12 de Nov. de 2019
Hello everyone!
I am trying to plot an animation using animatedline function and also controlling the speed of the animation using popupmenu. (such as 1/2x,1x,2x,4x etc).
I don't have any problem to create my animations in different speed.
The problem is , for example when I click "case 3" it starts to plot the animation and when I click case 4 (without waiting the end of the animation of case 3) it creates new one (case 4). Until this time still I don't have any problem. However, when "case 4" is ended the previous selection is going on (case 3). I want to figure out this issue. What I want is it should forget the previous one once I make a new selection.
I attached my code in below.
Is there any solution for this problem?
Thanks in advance.
switch get(handles.threeDOF_animation_speed,'Value')
case 1
case 2
run('threeDOF_create_animation.m')
set(handles.button_3DOF_save_gif,'Enable','on')
case 3
run('threeDOF_create_animation.m')
set(handles.button_3DOF_save_gif,'Enable','on')
case 4
run('threeDOF_create_animation.m')
set(handles.button_3DOF_save_gif,'Enable','on')
case 5
run('threeDOF_create_animation.m')
set(handles.button_3DOF_save_gif,'Enable','on')
end
  1 comentario
Anmol Dhiman
Anmol Dhiman el 12 de Nov. de 2019
Try using break within the switch case statements. If possible share the code to replicate the issue.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Animation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by