フィルターのクリア

How to create a cuboid by connecting points through scatter3 plot?

2 ビュー (過去 30 日間)
Swati Sarangi
Swati Sarangi 2020 年 11 月 6 日
コメント済み: KSSV 2020 年 11 月 6 日
Hi All,
I am following the approach to draw the cuboid by plotting the coordinates of the vertices through scatter plot; scatter3 and connecting the vertices through lines.
Here's my code; (I'm getting just discrete points from it but I want connections between points too)
Aa=30; Bb=30; Cc=30;
na=5; nb=5; nc=5;
lx=linspace(0,Aa,na);
ly=linspace(0,Bb,nb);
lz=linspace(0,Cc,nc);
scatter3(0,0,0,'r')
hold on
scatter3(1,0,0,'r')
hold on
scatter3(1,1,0,'r')
hold on
scatter3(0,1,0,'r')
hold on
scatter3(0,1,1,'r')
hold on
scatter3(0,0,1,'r')
hold on
scatter3(1,0,1,'r')
hold on
scatter3(1,1,1,'r')
hold on
figure;
line(lx,ly,lz)
can some one suggest how to do it?
Thanks in advance!
Regards
Swati

回答 (0 件)

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by