Filter löschen
Filter löschen

how to write call back for slider

1 Ansicht (letzte 30 Tage)
rafi abdul
rafi abdul am 21 Mär. 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

Antworten (0)

Kategorien

Mehr zu Specifying Target for Graphics Output finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by