×
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 Three Column Vectors As A Surface

Plotting Three Column Vectors As A Surface

Plotting Three Column Vectors As A Surface

(OP)
I'm a relatiely new Matlab user and I'm trying to plot a surface within Matlab and am not having much luck.  I always get error or warning message that the matrix dimensions must agree.  What I have is three column vectors, X, Y, and Z which all contain 21 entries.  Each row in the three vectors corresponds to a nodal position  This is a plate problem where X and Y define the physical dimensions and Z is the displacement.  Is it possible to plot the XYZ position for each node given that everything is in vector form?  I've tried using the surf and surfc commands however it seems they only work with square matrices.  Any help would be very much appreciated!

Thanks in advance,
-Brian

RE: Plotting Three Column Vectors As A Surface


The surf function only likes to plot on rectangular grids. You have two options:

1. Use the griddata function to interpolate your vectors:
[XI,YI,ZI] = griddata(x,y,z,XI,YI)

2. Hand-process your grid into a set of patches and plot each one separately using the 'patch' function.

CV

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