Borrar filtros
Borrar filtros

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

3 visualizaciones (últimos 30 días)
C Hart
C Hart el 12 de Oct. de 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;

Respuestas (0)

Categorías

Más información sobre Visual Exploration en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by