Effacer les filtres
Effacer les filtres

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

3 vues (au cours des 30 derniers jours)
C Hart
C Hart le 12 Oct 2016
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;

Réponses (0)

Catégories

En savoir plus sur Visual Exploration dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by