Array Indexing through a random plane or random line
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I have a 3D array M, and I wanted to get the intersection points of M and a random line or a random plane. Can anyone give some advice?
Thanks
Jack
댓글 수: 2
채택된 답변
KSSV
2021년 11월 18일
You can save the Slice into a variable which be of a class matlab.graphics. From this variable you can extract what you want.
% EXample
[X,Y,Z] = meshgrid(-2:.2:2);
V = X.*exp(-X.^2-Y.^2-Z.^2);
xslice = [-1.2,0.8,2];
yslice = [];
zslice = 0;
s = slice(X,Y,Z,V,xslice,yslice,zslice);
s
x = S(1).XData ;
y = S(1).YData ;
z = S(1).ZData ;
c = S(1).cData ;
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!