|
i have a 3Danimation plot posted to a GUI. i initiate the action on the plot via a 'pushbutton' also on the GUI. i have a 'slider' on the GUI where I want to control the speed of refreshing of the plot. i have the following code in the slider function
function slider1_Callback(hObject, eventdata, handles)
slider_value = get(hObject,'Value')
when i click on the 'slider' when the plot is running it will stop for the appropriate duration of time
i am new to matlab and pretty much a dufas and can't figure out how to pass the 'slider_value' into the 'pause' function which resides in the loop for the plot which is included in the 'pushbutton' function on the GUI...below is the portion of the code for the looping of the plot...you can see i have tried (guesed) at just about everything tryint to get the value into the 'pause'...one last thing...when I hard-code' the 'pause' function with a value...it works as expected anticipated
for k=3:length(Y)
z=t(:,1:k)
set(h,'Zdata',z)
drawnow
%set(eventdata,'slider1_Callback','slider_value')
%get(slider1_Callback,'eventdata')
%pause('eventdata')
set(slider1.hObject,'Callback','pause(slider_value)')
|