Home > Net >  Displaying a NxM matrix in a 2D plot
Displaying a NxM matrix in a 2D plot

Time:10-26

I have 64 sensors distributed in a 8x8 square. They record data during a time t at a certain frequency, so for each sensor I have N values.

I would like to be able to observe those data, with a 2D representation of all the values at a certain time. With the X and Y axis being the coordinate of the sensor in the square, and the value displayed as the intensity.

So far I've only be able to stock all the data in a matrix : Map(8x8xN). So I can access my square of data at a time t by doing : Map(:,:,t).

But now I'm kinda stuck since a while on how to do a 2D representation of this Map(:,:,t) ? I can see it in the "Variables" windows of Matlab but can't display it in a 2D colorfull map ^^"

I tried my best with the contourf function but can't understand how it works.

Thanks

CodePudding user response:

Try something like this:

v=zeros(9,9);
v(1:8,1:8)=Map(:,:,2);
pcolor(v);
  • Related