Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Member Login

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips now!
  • 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!

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

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Thanks! Awesome group. I put out a simple question in the access/vba forum that I couldn't find answered on technet or anywhere else on the web and it was answered the same day!!..."

Geography

Where in the world do Eng-Tips members come from?
yaston4 (Mechanical)
30 Jun 12 17:55
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
IRstuff (Aerospace)
30 Jun 12 18:29
Why not do the graph in Matlab?

Please refrain from double posting in the future.

TTFN
FAQ731-376: Eng-Tips.com Forum Policies

yaston4 (Mechanical)
2 Jul 12 8:31
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.
Helpful Member!  LiteYear (Computer)
2 Jul 12 21:58
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!
Helpful Member!  flash3780 (Mechanical)
17 Jul 12 10:44
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; 

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!

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