plotting N number of lines without for-loops
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Oscar Frick
el 22 de Jun. de 2018
Comentada: Dieter Karst
el 13 de Mayo de 2020
I have two matrixes of size (N,3), "S" corresponding to line start points "E" to line end points. I want to plot these lines, and know I can do it using
hold on
N = size(S,1);
for i = 1:N
plot3( [S(i,1),E(i,1)] , [S(i,2),E(i,2)] , [S(i,3),E(i,3)] )
end
Is there a way to achieve this without using for-loops? I have heard that inputing matrixes should have Matlab interpret the columns as several lines, but I have not gotten it to work properly.
0 comentarios
Respuesta aceptada
Ver también
Categorías
Más información sobre Surface and Mesh Plots 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!