Surface cut function in matlab?

In summary, the conversation discusses the use of functions in MATLAB to plot a 2-D matrix as a surface and the possibility of cutting the surface at a particular plane to observe the contour. The suggestion is made to plot specific rows of the matrix in 2-D for a planar cut, but it is noted that not all points on a planar cut belong to the same row. The conversation then suggests using 2-D interpolation to plot the desired points for a cut, specifically z_i =f(x_i,y_i). The request for a 2-D projection of the 3-D surface with corresponding contours is also mentioned.
  • #1
veejay
39
0
there're functions in MATLAB to plot a 2-D matrix as a surface.
not supposing the surface is like a paraboloid, is there a function to cut it at a particular plane to observe the contour?
any suggestions for the same would be appreciated.
thanks.
 
Physics news on Phys.org
  • #2
If you have a matrix and are plotting in 3-d, just plot the rows you wish to see in 2-d. It is the same as a planar cut.
 
  • #3
well, actually not all points on a planar cut belong to the same row of the matrix..
i hope u get what i mean. the resultant structure takes a definite shape like a paraboloid for example but the contours when viewed from the bottom arent circles.
is this too complicated for a planar cut in a desired direction?
 
  • #4
OK, I see what you need. I would try to do a 2-d interpolation, then plot the points you want to look at i.e. [itex] z_i =f(x_i,y_i) [/itex]. You should be able to get the cut you want.
 
  • #5
Dr Transport said:
OK, I see what you need. I would try to do a 2-d interpolation, then plot the points you want to look at i.e. [itex] z_i =f(x_i,y_i) [/itex]. You should be able to get the cut you want.

how do u do the 2-d interpolation?
actually, to be more clear what i need is a 2-d projection(x-y projection) of the 3-d surface, with contours corresponding to same z(height).
 

1. What is the purpose of the surface cut function in Matlab?

The surface cut function in Matlab is used to extract a portion of a 3D surface plot and display it separately. This can be useful for visualizing specific regions of interest in a larger surface plot, or for comparing different parts of the surface with each other.

2. How do I use the surface cut function in my Matlab code?

To use the surface cut function, you will need to specify the coordinates of the cutting plane and the surface data that you want to extract. You can then use the "cut" function to create a new surface plot with the desired portion of the original surface.

3. Can I apply the surface cut function to any type of surface plot in Matlab?

Yes, the surface cut function can be applied to any type of surface plot created in Matlab, including both regular and parametric surfaces. However, the results may vary depending on the complexity and type of the surface plot.

4. Is it possible to save the extracted surface data using the surface cut function?

Yes, you can save the extracted surface data as a new variable in your Matlab workspace. This can be done by assigning the output of the "cut" function to a new variable, which can then be saved using the "save" command.

5. Are there any limitations to using the surface cut function in Matlab?

While the surface cut function can be a useful tool for visualization, it does have some limitations. It may not be suitable for very complex or irregular surface plots, and may not always accurately capture the intended portion of the surface. It is important to carefully select and test the cutting plane coordinates to ensure accurate results.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
801
  • MATLAB, Maple, Mathematica, LaTeX
Replies
32
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
985
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
744
Back
Top