필터 지우기
필터 지우기

How to plot lines between all these points

조회 수: 1 (최근 30일)
S. David
S. David 2011년 4월 14일
Hi,
I have a matrix V, which is a 5-by-2 matrix, where each row represents a point in the xy-plain. How can I connect these points together in MATLAB, please?
Thanks in advance

채택된 답변

Matt Fig
Matt Fig 2011년 4월 15일
Does this do what you need?
V(6,:) = V(1,:); % To connect at the end. Assumes size(V,1) = 5;
line(V(:,1),V(:,2))
  댓글 수: 4
Matt Fig
Matt Fig 2011년 4월 15일
V(6,:) = V(1,:);
line(V(:,1),V(:,2),V(:,3))
S. David
S. David 2011년 4월 15일
This did not work, I just got two crossed lines in 2D. Why?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by