plotting matrix data on a 2D surface
plotting matrix data on a 2D surface
(OP)
hi all
i wish to plot a "boolean" matrix on a 2D surface, not like "mesh" or "surf", rather like a non-connected plot
something like
______________________
| * * |
| * |
| * * |
| * |
| * |
| * * |
|_______________*______|
where the matrix should be something like
( 0 0 1 0 0 1 0 1 0 0 0 )
( 0 0 0 1 1 0 0 0 0 1 0 )
a = ( 1 1 0 0 0 1 1 1 0 1 0 )
( 0 0 0 1 1 0 1 0 0 ....)
( ......................)
is this possible?
thanx in advance
P.D. i once had o copy of matlab with some toolboxes i cant remember where u could see a simulation of the brownian diffusion, and it looked quite what i want to do
i wish to plot a "boolean" matrix on a 2D surface, not like "mesh" or "surf", rather like a non-connected plot
something like
______________________
| * * |
| * |
| * * |
| * |
| * |
| * * |
|_______________*______|
where the matrix should be something like
( 0 0 1 0 0 1 0 1 0 0 0 )
( 0 0 0 1 1 0 0 0 0 1 0 )
a = ( 1 1 0 0 0 1 1 1 0 1 0 )
( 0 0 0 1 1 0 1 0 0 ....)
( ......................)
is this possible?
thanx in advance
P.D. i once had o copy of matlab with some toolboxes i cant remember where u could see a simulation of the brownian diffusion, and it looked quite what i want to do





RE: plotting matrix data on a 2D surface
% define a random 16 x 16 boolean matix
a = reshape([(mlbs(8)+1)/2; 1],16,16);
% find the row and column indices for the TRUE values
[r,c] = find(a);
% plot the true values
plot(r,c,'*');
alternatively you can get a filled-in plot showing the same information using:
imagesc(a);
Hope this helps
M
RE: plotting matrix data on a 2D surface
both solutions work all right
P.D. thats for other readers: MLBS function is a function out of Frequency Domain System Identification toolbox (i dont have it, but thats no trouble to me)