Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Ranges in colorbar, 3D shaded surf

1 vue (au cours des 30 derniers jours)
Elria
Elria le 28 Sep 2012
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hello, I would like to create a 3d shaded surface and I got X,Y,Z tables (X is 1*21 table, Y is 9*1 and Z is 9*21 table). I would alsoi like to define colors in colorbar in order Z values from 0 to 1803 to be red, from 1803 to 2755 to be yellow and from 2755 to 76387 to be green. All I get is this but the ranges are not correct: http://www.flickr.com/photos/87753025@N03/8031780155/ How can I do that? How can I proceed with coding? Thank you!
surf(X,Y,Z)
colorbar
colormap([1 0 0; 1 1 0; 0 1 0]

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by