slicing a volume in desired direction
4 次查看(过去 30 天)
显示 更早的评论
ver- 2018a
I have two matrices one with vertices (560 × 3) and faces (1112×3)
After using patch command i get cylinder figure (see atached image).
Since i dont have an equation for volume as shown in matlab document, inorder to use the vertices matrix with slice command i tried to reshape it to B= (56×3×10) .
>>[X,Y,Z] = meshgrid(-2 : 0.2 : 2);
>> slice(X, Y, Z, B, 0, [], [])
I get the following error .
Error using griddedInterpolant
The grid vectors do not define a grid of points that match the given values.
Error in interp3 (line 146)
F = griddedInterpolant(X, Y, Z, V, method,extrap);
Error in slice (line 103)
vi = interp3(x,y,z,v,xi,yi,zi,method);
Is there any alternative to this slice command ,any suggestion is helpful .
Thank you.
0 个评论
回答(1 个)
LO
2019-6-10
I am not sure what you want to achieve
perhaps you could use the find function to determine vertices ranges, select them, and use them to render another cylinder (slicing the first one). Would this make sense ?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!