Connecting points in 3D using plot3
显示 更早的评论
Hi,
Suppose I have three points:
A=[1 1 1];
B=[2 2 2];
C=[3 3 3];
and suppose that I want to draw black lines connecting point A to point B to point C (in that order). How can I do this? If I try the following,
plot3(A,B,C,'k.')
this is not the correct syntax, it seems. Can you please help me see what I am doing wrong? Thank you very much.
Andrew DeYoung
Carnegie Mellon University
采纳的回答
更多回答(1 个)
Walter Roberson
2011-6-3
xyz = vertcat(A,B,C);
plot3(xyz(1,:),xyz(2,:),xyz(3,:),'k.');
类别
在 帮助中心 和 File Exchange 中查找有关 Time-Domain Analysis 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!