How to set value in array as gradient to color patch

Hi,
I have a vector containing different values (decreasing values) . I want set the color of my subsequent patch faces depending on the value containing in the vector. In particolar, i.e. the highest value to red and the lowest to blue.
Matlab has a function that automatically sets the color of my patch depending on value contained in my vector? Could you give me an example?

 채택된 답변

Image Analyst
Image Analyst 2015년 1월 15일

0 개 추천

I believe that's what pcolor() does. It puts the values along the edges of tiles/patches and colors the patch based on the edges values.

추가 답변 (0개)

카테고리

태그

질문:

2015년 1월 15일

답변:

2015년 1월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by