How to create a cuboid by connecting points through scatter3 plot?
1 回表示 (過去 30 日間)
古いコメントを表示
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 Exchange で Scatter Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!