threshold 3D visualisation
古いコメントを表示
Suppose we have a 3D array r(x,y,z) filled with values 1 and 2. 1. How to visualise it into a 3D model? 2. How to visualise only "2" values, i.e. make "1" invisible? Thank you!
採用された回答
その他の回答 (1 件)
Massimo Zanetti
2016 年 9 月 26 日
編集済み: Massimo Zanetti
2016 年 9 月 26 日
Try this out. Given a set of 10 points (3dim) and a set of labels (1,2) it returns the plot of the points according to the labels.
XYZ = rand(10,3);
R = [1,1,2,1,2,2,2,1,2,1];
R1 = (R==1);
R2 = (R==2);
figure;
scatter3(XYZ(R1,1),XYZ(R1,2),XYZ(R1,3),'r','filled');
hold on;
scatter3(XYZ(R2,1),XYZ(R2,2),XYZ(R2,3),'b','filled');
hold off;
You may also want to map colors of the colormap directly to labels, in automated way.
figure;
scatter3(XYZ(:,1),XYZ(:,2),XYZ(:,3),30,R,'filled');
8 件のコメント
Vadim Tambovtsev
2016 年 9 月 26 日
編集済み: Vadim Tambovtsev
2016 年 9 月 26 日
Massimo Zanetti
2016 年 9 月 26 日
Is your "r" the matrix of coordinates or labels? They are different.
Vadim Tambovtsev
2016 年 9 月 26 日
Massimo Zanetti
2016 年 9 月 26 日
And where you stored the 3d point coordinates? Why is your "r" a matrix instead of a vector?
Vadim Tambovtsev
2016 年 9 月 26 日
Massimo Zanetti
2016 年 9 月 26 日
So for each 3d point, you have 3 labels??
Massimo Zanetti
2016 年 9 月 26 日
Can you give me an examplt of an input yuo have to display?
Vadim Tambovtsev
2016 年 9 月 26 日
カテゴリ
ヘルプ センター および File Exchange で Discrete Data Plots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!