Way to plot multiple lines in 3d specifying start and end point?

Is there a way to plot multiple lines on 3 axis and specify the start and end point
This is a crude example but something like Line Start (x,y,z) Line To (x,y,z)

 채택된 답변

KSSV
KSSV 2018년 12월 11일
편집: KSSV 2018년 12월 11일
P0 = rand(7,3) ;
P1 = rand(7,3) ;
X = [P0(:,1) P1(:,1)] ;
Y = [P0(:,2) P1(:,2)] ;
Z = [P0(:,3) P1(:,3)] ;
plot3(X',Y',Z')
hold on
plot3(X',Y',Z','.')

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2018년 12월 11일

편집:

2018년 12월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by