How to get a tilted slice in 3-D data?
10 次查看(过去 30 天)
显示 更早的评论
By using slice in MATLAB, I can get a slice plot which is perpendicular to the axes. But I was wondering how to get a tilted slice (not perpendicular to the axes), like the picuture shown?
0 个评论
采纳的回答
Aniruddha Katre
2017-3-3
编辑:Star Strider
2017-3-3
See the section about slicing at arbitrary angles of the documentation page for the slice function.
Here's a quick example:
% Data
[x, y, z] = meshgrid(-3:1:3);
v = x.^2 + y.^2 + z.^2;
% Data defining a surface
[xs, ys] = meshgrid(-3:1:3);
zs = -xs + ys;
% Slice along it
slice(x, y, z, v, xs, ys, zs)
colorbar
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!