フィルターのクリア

Array Indexing through a random plane or random line

1 回表示 (過去 30 日間)
Yulai Zhang
Yulai Zhang 2021 年 11 月 17 日
コメント済み: Yulai Zhang 2021 年 11 月 19 日
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 件のコメント
Walter Roberson
Walter Roberson 2021 年 11 月 17 日
if you happen to be doing this for drawing purposes, see slice()
Yulai Zhang
Yulai Zhang 2021 年 11 月 17 日
Thanks Walter. This is very helpful. I can see that the data is extracted and displayed. How can I access the data?

サインインしてコメントする。

採用された回答

KSSV
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 ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by