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!