Borrar filtros
Borrar filtros

How can i make a 3D plot that is made of many 2-points line with a direction

2 visualizaciones (últimos 30 días)
I have 2 matrices of XYZ (in one variable) that shows the location of 2 points on an object head-to-tail. I need to make a 3D plot that shows the direction of the line that connects the 2 points together (for example, the 1st matrix shows the head of the object). moreover, i need it to draw one of every 20 rows.
I don't even know where to start... my variable is with 6 (XYZXYZ) columns and about a thousand rows. Thank you very much! Ziv

Respuesta aceptada

Thorsten
Thorsten el 19 de Nov. de 2014
Editada: Thorsten el 19 de Nov. de 2014
quiver3 is the function that you need
M = rand(100, 6);
ind = 1:20:size(M, 1);
quiver3(M(ind, 1), M(ind, 2), M(ind, 3), M(ind, 4), M(ind, 5), M(ind, 6))
  1 comentario
Ziv Kassner
Ziv Kassner el 20 de Nov. de 2014
Thank you so much. Sadly, it doesn't work as I want it to. I need the arrows to connect both lines so, for example, every blue arrow will start the place it starts as it shows on the picture, but the head will be on the same index of XYZ on the black line.
Ziv

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Object Properties en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by