user1285419
user1285419

Reputation: 2225

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.

Upvotes: 1

Views: 2051

Answers (1)

angainor
angainor

Reputation: 11810

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);

Upvotes: 1

Related Questions