Effacer les filtres
Effacer les filtres

How to plot lines between all these points

1 vue (au cours des 30 derniers jours)
S. David
S. David le 14 Avr 2011
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

Réponse acceptée

Matt Fig
Matt Fig le 15 Avr 2011
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 commentaires
Matt Fig
Matt Fig le 15 Avr 2011
V(6,:) = V(1,:);
line(V(:,1),V(:,2),V(:,3))
S. David
S. David le 15 Avr 2011
This did not work, I just got two crossed lines in 2D. Why?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by