Sorry for this simple question.
I have a 2D matrix , and I was trying to display it as a colored image uisng "colormap", but I just get black and white image.
figure('Name','network matrix');
imsh=imshow(nwmat, 'InitialMagnification','fit');
colormap ('jet');
The figure' colors supposed to be similar to this one
but i get a figure with colors like this

댓글 수: 2

Stephen23
Stephen23 2019년 6월 7일
편집: Stephen23 2019년 6월 7일
Your array only consists of two values:
>> unique(nwmat(:))
ans =
0
1
Would you expect two values to be displayed with more than two colors?
Or do you want two other colors to be used to represent the two values in your array?
I am sorry. It's my mistake . I attached the wrong matrix. I have attached the original one named "nwmat". Thanks for your concern.

댓글을 달려면 로그인하십시오.

 채택된 답변

Stephen23
Stephen23 2019년 6월 8일

0 개 추천

imshow(nwmat,'DisplayRange',[],'Colormap',jet(64))

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 White에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by