×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

plotting matrix data on a 2D surface

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

RE: plotting matrix data on a 2D surface

This should do it

% 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

(OP)
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)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources