Borrar filtros
Borrar filtros

how to write call back for slider

3 visualizaciones (últimos 30 días)
rafi abdul
rafi abdul el 21 de Mzo. de 2013
my requirement is to slide the plots along x-axis.in my graph i have multiple axis and i have set xlim for all graphs am able to slide both sides .but when i zoom the plots and xlim will get changed and when i try to slide the zoomed plots slider should take the new limits of the zoomed plots as min and max.how to write callback for slider .please help.
function slider1_Callback(hObject, eventdata, handles)
% hObject handle to slider1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
h(1)=handles.h(1); %handles of axis1
h(2)=handles.h(2); %handles of axis2
h(3)=handles.h(3); %handles of axis3
value=get(hObject,'value');
x=0:1310680;
hax = [h(1);h(2);h(3)];
if value>=0
set(hax,'XLim',[min(x),max(x)]+.5*get(hObject,'value'));
end

Respuestas (0)

Categorías

Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by