Colormap with Image command

조회 수: 3 (최근 30일)
Paul Fishback
Paul Fishback 2013년 11월 17일
댓글: Paul Fishback 2013년 11월 18일
I'm trying to plot intensity levels from an 8-by-8 matrix A whose values vary from 0 to 1. As a start, I entered the following,
image(A);
colormap('autumn');
colorbar('EastOutside');
The result produces a colorbar whose values appear to increase from 0 to 60. I have no idea where the "60" is coming from. More problematic is that the entries of A are so small that I don't see any color variation in the image. It appears monochromatic. Of course, I can scale A by a large number, but this seems to mess up the colorbar values.
How can I change input into the image and/or colormap commands so as to see different colors? Of course, I can just multiply A by a large number, but this messes up the scaling on the colorbar. Also, I want the colorbar labels to increase from 0 to 1.
Any help would be appreciated.

채택된 답변

Walter Roberson
Walter Roberson 2013년 11월 17일
I think if you check, you will find that max(A(:)) is only 60.
  댓글 수: 1
Paul Fishback
Paul Fishback 2013년 11월 18일
Actually I used max(max(A)) to get a number less than one. But I do see that using imagesc as opposed to image takes care of what I need. Thanks.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Orange에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by