MATLAB Surface cut function in matlab?

AI Thread Summary
In MATLAB, there are functions available to plot a 2-D matrix as a surface, but for visualizing a specific contour at a certain height, a planar cut can be achieved through 2-D interpolation. The discussion emphasizes that while plotting rows of the matrix can provide a view, it may not accurately represent all points on a planar cut, as these points may not belong to the same row. To achieve the desired 2-D projection (x-y projection) of the 3-D surface with contours at the same height (z), performing 2-D interpolation is recommended. This method allows for plotting the specific points of interest, effectively visualizing the contours of the surface.
veejay
Messages
39
Reaction score
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
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.
 
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?
 
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. z_i =f(x_i,y_i). You should be able to get the cut you want.
 
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. z_i =f(x_i,y_i). 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).
 

Similar threads

Back
Top