plotting lines in 3D

7 ビュー (過去 30 日間)
Deepa Maheshvare
Deepa Maheshvare 2020 年 7 月 19 日
回答済み: KSSV 2020 年 7 月 19 日
I've the following to add additional points on a line joingin 2 points located in 3D space extended from 2D example shown here.
xyz1 = [-1,3,0];
xyz2 = [2,5,2];
n=5;
t = linspace(0,1,n+1)';
xyz = (1-t)*xyz1 + t*xyz2
plot(xyz(:,1),xyz(:,2),xyz(:,3),'b-o')
Plot doesn't work fro 3D,I would like to know how to plot the above.

採用された回答

KSSV
KSSV 2020 年 7 月 19 日
plot3(xyz(:,1),xyz(:,2),xyz(:,3),'b-o')

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by