Get Colormap Values Corresponding to Array Values
古いコメントを表示
Dear Matlab Community,
Currently I am trying to visualize neuroimaging data and have thus run into the following problem:
I have an array of 1990 values, which I want to plot in different colors on a continuous colorbar. So all I would require is the information on how I can get a matrix with RGB triplets corresponding to the data in my array. I have already tried the following:
c = jet(cvals)
Which yields in the following code:
Error using /
Matrix dimensions must agree.
Error in jet (line 23)
u = [(1:1:n)/n ones(1,n-1) (n:-1:1)/n]';
Any help would be greatly appreciated.
Thank you!
2 件のコメント
Yazan
2021 年 8 月 13 日
What version of Matlab do you have? When run on 2021a, no errors were received.
Hannah_Mad
2021 年 8 月 13 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Blue についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!