Plotting Multiple Lines from two end points in a matrix without a loop?

조회 수: 2 (최근 30일)
Xymbu
Xymbu 2021년 12월 21일
댓글: Mitchell Thurston 2021년 12월 25일
I have sets of two end points in xyz coord in a matrix in the form of
V (2,3,418)
so for example V(1,:,1) would call the start point of the first line as [x, y, z ]
and V(2,:,1) would call the end point as [x,y,z]
I can plot this in a loop like
for i = 1:length
plot3(V(:,1,i),V(:,2,i),V(:,3,i))
end
I was wondering if theres a way I can plot this all at once with out a loop?
  댓글 수: 3
Xymbu
Xymbu 2021년 12월 21일
Thank You! That is very useful
Mitchell Thurston
Mitchell Thurston 2021년 12월 25일
so I left the tab open for this, and I got thinking again would a quiver3 be more what you're looking for?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by