Sunday, 15 September 2013

Simultaneous animation at two axes in a matlab figure -



Simultaneous animation at two axes in a matlab figure -

first of all, have run gui has axes, axes1, axes2 .then open file animate in axes1.then open file , animate in axes2. problem have button,that when pushed must provoke animation of both files in both axes simultaneously. possible ?

my code button

function compare_animation_callback(hobject, eventdata, handles) play_callback(hobject,eventdata, handles);%axes1 play_results_callback(hobject,eventdata, handles) %axe2

the problem in animation code, because file animated second.the code animation is:

handles = startanimation(~,handles) global vars_global_anim % pause animation might running pauseanimation; % prepare animation controls frames_total = max([handles.mot.nframes]); set(handles.slider_animate, 'enable','on','max', frames_total+.001,'value', 1,'sliderstep', [1/frames_total 1/frames_total]); set(handles.slider_speed, 'enable','on'); speed = get(handles.slider_speed,'value'); % set properties animation %not of import %rehash path set(gcf,'currentaxes',handles.axes_animate); cla reset; % start animation vars_global_anim.animation_paused = false; new_animate(handles.skel,handles.mot,1,speed,{},{},{'updateanimationslider',handles.slider_animate},true);

last lastly function called new_animate (...), @ end of function start_animation. in function code refers figure or axes :

new_animate_initgraphics; desired_frame_time = vars_global_anim.mot(1).frametime; if (~isempty(vars_global_anim.figure_camera_file)) h = str2func(vars_global_anim.figure_camera_file); feval(h, gca); end if (~isempty(vars_global_anim.figure_position)) set(gcf,'position',vars_global_anim.figure_position); end

the function new_animate_initgraphics(if needed can upload it)is big have all..of course of study code isn't mine. can't understand how utilize gca in order not lose 1 animation , both simultaneously??

any advice helpful.

matlab animation axes simultaneous

No comments:

Post a Comment