×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

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!

*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

3D surface plots
2

3D surface plots

3D surface plots

(OP)
I am really in need of some help please.

I am new to Matlab and I need to produce a 3D surface plot using the data in excel, can anyone help me. I have posted the excel data. I have plotted the surface plot in excel, but as you can see the surface plot is not very smooth and I believe Matlab can produce a smoother plot.

I don't mind using any other software that might achieve a smoother surface plot.

Thank-you

RE: 3D surface plots

(OP)
Thank you IRStuff and I apologise for the repeated post.

I have found a program on MATLAB central, which I think can help me with my problem. I wondered if anyone is having the same problem with it as I am. I open the MainGUI.m in MATLAB and run the code using (F5), but when the GUI pops up non of the GUI buttons seem to offer any commands.

http://www.mathworks.com/matlabcentral/fileexchang...

Sorry I am new to Matlab. Thanks.

RE: 3D surface plots

I think you're over-complicating this. Two Google searches and I've arrived at this solution:

1. Select the data (Z) values in Excel and copy them to the clipboard.

2. Enter the following in Matlab.
>> [X, Y] = meshgrid(-16:1:11, 1:1:19);
>> UIIMPORT('-pastespecial')

3. Ensure the data from Excel appears as necessary, then click Next and Finish.

4. Plot the result in Matlab using the following command.
>> surf(X, Y, A_pastespecial)

Is that what you're after?

The surf command has lots of options for changing the appearing. The mesh command might be what you want too. Check out the options here:

http://www.mathworks.com.au/help/techdoc/learn_mat...

There could be more elegant solutions too, but if quick and dirty is what you're after then I think you have it!

RE: 3D surface plots

There are lots of ways to create such a plot. I might fill in the empty cells with zeros and save the XLS file as a CSV file.
From there, you could do:

CODE

DATA = csvread('data1.csv');
x = DATA(2:20,1);
y = DATA(1,2:29);
[xx,yy]=meshgrid(x,y);
zz = DATA(2:20,2:29)';
surf(xx,yy,zz);
grid on; axis equal; colorbar; 

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! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close