Get Colormap Values Corresponding to Array Values
Mostrar comentarios más antiguos
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 comentarios
Yazan
el 13 de Ag. de 2021
What version of Matlab do you have? When run on 2021a, no errors were received.
Hannah_Mad
el 13 de Ag. de 2021
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Blue en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!