필터 지우기
필터 지우기

Rescaling RGB for imagesc

조회 수: 4 (최근 30일)
Zahra Yousefi Darani
Zahra Yousefi Darani 2023년 7월 30일
댓글: Zahra Yousefi Darani 2023년 7월 30일
I have a colormap:
BeautifulColorVector =
0.3735 0 0.7500
0.2490 0 0.5000
0.1245 0 0.2500
0.0700 0.0700 0.0700
I made this to create a 2x2 matrix with beautiful colors by imagesc.
How can I rescale the colour in a way that true colors appear by imagesc function?

채택된 답변

Walter Roberson
Walter Roberson 2023년 7월 30일
BeautifulColorVector = [
0.3735 0 0.7500
0.2490 0 0.5000
0.1245 0 0.2500
0.0700 0.0700 0.0700];
img = [1 2; 3 4];
imagesc(img); colormap(BeautifulColorVector)
  댓글 수: 1
Zahra Yousefi Darani
Zahra Yousefi Darani 2023년 7월 30일
Amazing!
Thanks a lot Walter!

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by