How to obtain a section from a surf plot
Show older comments
Dear all,
I have a surface plot that represents the bathymetry of a given surface:
x=longitute;
y=latitude;
z=depth;

Now, I want to obtain a section that cuts this surface at the latitude (37.9º) in order to obtain something like the following figure:

How can I do this?
Thanks in advance.
2 Comments
The example image isn't a section. It simply appears to be the same surface from a 2D view, like
shading flat % get rid of edges
view([0 -1 0]) % set 2D view looking toward +y
Either that, or it represents some sort of difference information.
If you actually want a section, it will just be a line. If the query point where you want to make the section belongs to the x,y points you're using, then all you have to do is extract the corresponding vector from the Z data. If it lies between the plotted points, then you'll have to interpolate.
Ricardo Duarte
on 1 Jul 2021
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
