필터 지우기
필터 지우기

how to write call back for slider

조회 수: 1 (최근 30일)
rafi abdul
rafi abdul 2013년 3월 21일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by