How to obtain a section from a surf plot
39 views (last 30 days)
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
Accepted Answer
KSSV
on 1 Jul 2021
Check this demo example, may be useful.
[X,Y,Z] = peaks(100) ;
surf(X,Y,Z)
xi = unique(X(:)) ;
val = 0; dx = 10^-3 ; w = 10 ;
yi = linspace(val-dx,val+dx,w) ;
[Xi,Yi] = meshgrid(xi,yi) ;
Zi = interp2(X,Y,Z,Xi,Yi) ;
surf(Xi,Yi,Zi)
4 Comments
More Answers (0)
See Also
Categories
Find more on Lighting, Transparency, and Shading 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!