replacement of for loop

1 visualización (últimos 30 días)
Khawaja Asim
Khawaja Asim el 26 de Feb. de 2012
I am writing this statement as replacement of for loop operation
indexes= ROI~=255 && ROI~=0;
ROI is a matrix and I am trying to find those indexes in the matrix ROI whose values are other than 0 and 255. but this statement gives some error. Kindly help by showing me correct syntax.

Respuesta aceptada

Jiro Doke
Jiro Doke el 26 de Feb. de 2012
It should be & instead of &&
indexes= ROI~=255 & ROI~=0;
  1 comentario
Khawaja Asim
Khawaja Asim el 26 de Feb. de 2012
it was v simple :) how i couldn't try that.. lol
thanks.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing 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