필터 지우기
필터 지우기

Get values represented in a figure (GUIDE)

조회 수: 1 (최근 30일)
fjnb86
fjnb86 2011년 10월 13일
Hello everyone,
I am working in a GUIDE which plots two figures
One of them is a simple data representation (figure1) and the other is the result of one algorithm(figure 2)
My idea is make something interactive to zoom in the data representation and automatically perform the algorithm refreshing the figure 2
Im reading about linkprop but I dont know how to get handle with the data represented just in the window (zoomed) of the figure 1.
Perhaps there is other approach easier
Thanks in advance!

채택된 답변

fjnb86
fjnb86 2011년 10월 13일
founded! (more or less)
get(handles.axes1,'XLim')
get(handles.axes1,'YLim')
  댓글 수: 3
fjnb86
fjnb86 2011년 10월 18일
this get the limits of the are represented
then u only have to filter, for example
rangeY=get(handles.axes1,'YLim'); %obtain limits of y values in time space plot
rangeX=get(handles.axes1,'XLim'); %obtain limits of x values in time space plot
sourcedata = getappdata(0,'sourcedata'); %obatin original data saved before on root 0
rangedDATAprevious = source data((sourcedata(:,1)>=rangeX(1) & sourcedata(:,1)<=rangeX(2)),:);
rangedDATA = rangedDATApreivous((rangedDATAprevious(:,2)>=rangeY(1) & rangedDATApprevious(:,2)<=rangeY(2)),:);
fjnb86
fjnb86 2011년 10월 18일
plot(rangedDATA)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Exploration에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by