필터 지우기
필터 지우기

how do I temporarily stop ginput for right button (button ==3)?

조회 수: 3 (최근 30일)
C Hart
C Hart 2016년 10월 12일
I want to place a 'flag' in a matrix, when the right button (button == 3) has been placed. However, when I try to enable ginput for that specific cell, I just turn of ginput for the entire matrix... How can I make this happen for only that cell? I have tried many things already, but this is the final product I am struggeling with at the moment.... any tips?
elseif button == 3 % right click
text(x-0.9,y-0.5,'Flag')
flag_matrix(a,b)= bombboard_to_matrix(x,y);
flag_matrix(a,b)=10;
if flag_matrix(a,b)== 10;
[a,b,button]=ginput(1);
ginput off;
end;

답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by