Refer to my code, how to specify the axes for plot the animated line.
In your code, there is ' gui_OpeningFcn', @transmision_en_vivo_OpeningFcn, it has updated guidata(hObject, handles).
function pushbutton1_Callback(hObject, eventdata, handles)
h = animatedline(handles.axes1);
axis([0 4*pi -1 1])
for x = linspace(0,4*pi,10000)
y = sin(x);
addpoints(h,x,y)
drawnow limitrate
end
In your code, you just need to specify the axes in line=animatedline(handles.axes1).
forgot to mention that, it is better to specify the axes for axis([muestra-10,muestra,0,360])
axis(handles.axes1,[muestra-10,muestra,0,360])
Best Answer