Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
454 views
in Technique[技术] by (71.8m points)

color mapping - pcolor map in matlab

In matlab, we can use pcolor to show the magnitude of data in color. I am trying the following data

 A=[1:10; 16:25; 86:95];
 pcolor(A);

It only show two rows. Why is that and how to show all those three data set? Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

From documentation of pcolor

In the default shading mode, 'faceted', each cell has a constant color and the last row and column of C are not used.

Use imagesc instead

imagesc(A);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...