How does surf map colormatrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I know surf(x,y,z,c) will use matrix c to map color, but how does it work? since matrix c actually has the size of z, instead of size of z x 3 (that's what I thought first, for I thought you specified the RGB for each element of z), how does matlab map c to different color schemes? For example,
surf(x,y,z,c); colormap winter
So how does matlab find the corresponding color based on c?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 19 Jan. 2012
It uses the standard color mapping techniques: min value of c maps to the lowest entry in the color map, max value of c maps to the highest entry in the color map, everything in between maps linearly in to color map index numbers.
You can change properties to change the mapping strategy.
2 Kommentare
Walter Roberson
am 20 Jan. 2012
If you do not use c then z will be copied to the internal property that c would otherwise go in (CData) and then the mapping proceeds in exactly the same way.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Orange finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!