DataCursormode - Selecting Points on Graph
조회 수: 1 (최근 30일)
이전 댓글 표시
I attempted to implement this idea:
However, suppose I want to limit the mouse clicks to a variable
function pick_Callback(hObject, eventdata, handles)
pick = handles.pick %Pick could be any random number
dcm_obj = datacursormode(figure (8));
set(dcm_obj,'DisplayStyle','datatip',...
'SnapToDataVertex','off','Enable','on')
c_info = getCursorInfo(dcm_obj);
if(numel(c_info)==numel(pick))
set(dcm_obj,'Enable','off');
end
For some reason, it allows me to continue selecting points. I want it to stop at numel(pick).
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!