I have a cubic box with dimension of 1 x 1 x 1 with 100 spheres inside this box. I know the coordinate of x,y,z and radius of each spheres. I want to slice through this cubic box that is perpendicular to the z-direction at z=0.5.
x,y, and z have the dimension of 100 x 1.
Thank you

답변 (1개)

Sean de Wolski
Sean de Wolski 2015년 6월 3일
편집: Sean de Wolski 2015년 6월 3일

0 개 추천

What do you mean by "slice"?
doc slice
?
sz = size(x)
xs = x(1:ceil(sz(1)/2),:,:);
?

댓글 수: 3

Laura
Laura 2015년 6월 3일
편집: Laura 2015년 6월 3일
Keep z=0.5, what are the values of x and y. If I cut a plane at z=0.5, what are the coordinates of x,y, and z on that plane.
Sean de Wolski
Sean de Wolski 2015년 6월 3일
Slice function or interp3 would do that for you.
Laura
Laura 2015년 6월 8일
I look at slice function, however I don't quite understand how it works. They define the volume (V) such as some kind of functions? what is that?. Please helps. Thanks

댓글을 달려면 로그인하십시오.

카테고리

태그

질문:

2015년 6월 3일

편집:

2015년 6월 8일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by