How to get RGB color matrix from input array

3 ビュー (過去 30 日間)
Eric
Eric 2014 年 7 月 16 日
回答済み: Chad Greene 2014 年 7 月 16 日
I want to get the RGB color matrix from an input array. I can do this with imagesc to plot the array onto a colormap, however, I want to get the RGB matrix that equates to these colors. For example, my input is a 10x1 array, and imagesc plots this as colored bars on the hsv colormap. I want to get the RGB matrix that would correspond to these colors.
Edit: To be specific, I have a set of data and the corresponding densities. Basically, I want to plot the data for each iteration and have the color correspond to the density ranging from hot(higher density) to cool (lower density).

回答 (1 件)

Chad Greene
Chad Greene 2014 年 7 月 16 日
cmap = colormap; returns the current colormap. Your question is tough to interpret. Are you plotting your 10x1 array with imagesc?

カテゴリ

Help Center および File ExchangeColor and Styling についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by