Move through slices in 3 D plot matlab?

I have a 3 D plot of 15000 points, where each point is represented by a sphere in X, Y, Z axis. I want to be able to move through slices of my plot through GUI but I am not sure how I can do that. PS: I poltted the points using scatter3 function on MATLAB.

回答 (1 件)

Kevin Holly
Kevin Holly 2022 年 8 月 11 日

0 投票

You could make a slider that changes the variable xslice
xslice = 0.5;
X = rand(10000,1);
Y = rand(10000,1);
Z = rand(10000,1);
figure
scatter3(X,Y,Z)
figure
scatter3(X(X>xslice),Y(X>xslice),Z(X>xslice))
xlabel('X')
ylabel('Y')
zlabel('Z')
xlim([0,1])

1 件のコメント

Kevin Holly
Kevin Holly 2022 年 8 月 11 日
Here, I made an app with the concept. See app attached.

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

カテゴリ

製品

リリース

R2022a

タグ

質問済み:

2022 年 8 月 11 日

コメント済み:

2022 年 8 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by