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

10 Ansichten (letzte 30 Tage)
Chris
Chris am 11 Dez. 2018
Bearbeitet: KSSV am 11 Dez. 2018
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)

Akzeptierte Antwort

KSSV
KSSV am 11 Dez. 2018
Bearbeitet: KSSV am 11 Dez. 2018
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','.')

Weitere Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by