×
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

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!


Resources