how to built custom a colormap

조회 수: 1 (최근 30일)
ha ha
ha ha 2019년 2월 9일
댓글: madhan ravi 2019년 2월 9일
I want to built "colorRGB" matrix with k-by-3 matrix (k is predefined number by the user)
Let's say: I need 5 colors (k=5; & random color, but NOT include white color)
colorRGB=[0, 0.4470, 0.7410; 0, 0, 1; 0.85, 0.32, 0.09; 0, 0.75, 0.75; 0.25, 0.25, 0.25];.
colorRGB=[0, 0.4470, 0.7410
0, 0, 1
0.85, 0.32, 0.09
0, 0.75, 0.75
0.25, 0.25, 0.25]
How can I do that? In case I want to build 100 random color matrix. How can I do that?
(Plz see picture below for visualization)

채택된 답변

Image Analyst
Image Analyst 2019년 2월 9일
Try this:
yourColormap = rand(k, 3); % Colormap with k random colors.
  댓글 수: 3
Image Analyst
Image Analyst 2019년 2월 9일
It can be used if you want that colormap. However that is not a random colormap like the poster wanted so that particular colormap would not be used in "ha ha"'s case.
madhan ravi
madhan ravi 2019년 2월 9일
Thank you for clarifying sir Image Analyst.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by