Creating 3D Surface Plots with Matlab

In summary, the conversation discusses using Matlab to create a 3d surface plot from Excel data. The individual asking for help has downloaded all the necessary files and opened the MainGUI.m file, but is having trouble getting the buttons to work. Another individual suggests making sure the files are extracted and the directories are set properly. It is also noted that there is a readme file for properly labeling Excel sheets.
  • #1
MechEng2010
13
0
Physics news on Phys.org
  • #2
Hey MechEng2010 and welcome to the forums.

I'm just wondering if you have extracted all the files to a directory, set either the current directory or directories to include to that directory and then executed the file?

I have noticed that the other files are in the ZIP, and also that there is a readme for how excel sheets should be labeled (if you get to this point where you can't load up a spreadsheet properly).
 

1. How do I create a 3D surface plot in Matlab?

To create a 3D surface plot in Matlab, you can use the "surf" function. This function takes in three inputs: x, y, and z, which represent the x and y coordinates of the points on the surface and the corresponding z values. You can also add optional inputs such as color and shading options to customize your plot.

2. How can I add labels and titles to my 3D surface plot?

To add labels and titles to your 3D surface plot, you can use the "xlabel", "ylabel", and "zlabel" functions to add labels for the x, y, and z axes respectively. You can also use the "title" function to add a title to your plot. Additionally, you can use the "legend" function to add a legend if you have multiple surfaces in your plot.

3. Can I customize the appearance of my 3D surface plot in Matlab?

Yes, you can customize the appearance of your 3D surface plot in Matlab by using various optional inputs in the "surf" function. Some of these options include changing the color, shading, and lighting of the plot. You can also use the "colormap" function to change the color scheme of your plot.

4. How can I save my 3D surface plot as an image file?

To save your 3D surface plot as an image file, you can use the "saveas" function. This function takes in two inputs: the figure handle and the filename for the saved image. You can specify the file format (e.g. png, jpg) in the filename as well.

5. Are there any other types of 3D plots that can be created in Matlab?

Yes, in addition to surface plots, Matlab also allows you to create other types of 3D plots such as scatter plots, line plots, and bar graphs. These can be created using the "scatter3", "plot3", and "bar3" functions, respectively. You can also create multiple plots in one figure using the "subplot" function.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
994
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
Back
Top