Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

plotting matrix data on a 2D surface 1

Status
Not open for further replies.

antiseptic

Bioengineer
Jan 15, 2003
11
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
 
Replies continue below

Recommended for you

This should do it
Code:
% 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:
Code:
imagesc(a);
Hope this helps

M
 
thanks a lot!
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)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor