How to show an image?

1 visualización (últimos 30 días)
Darsana P M
Darsana P M el 6 de Abr. de 2018
Comentada: Darsana P M el 6 de Abr. de 2018
I would like to display a matrix as an image. The matrix is of size 250 2. I used image() function. But got an error stating an error.
CIJ=cell2mat(Cipher);
kk=CIJ*(1/100);
Cipher is of size 250 2. I tried to display kk, but I got a blue image. It must be a black and white image know? How to solve this issue?
  2 comentarios
Dennis
Dennis el 6 de Abr. de 2018
why do you expect a black and white image? you can use colormap to change colors
Darsana P M
Darsana P M el 6 de Abr. de 2018
How to use colormap function?

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Abr. de 2018
image(kk)
colormap(gray(256))
  1 comentario
Darsana P M
Darsana P M el 6 de Abr. de 2018
That helped me. Thanks sir

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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