Finding the path between two points
Ältere Kommentare anzeigen
Hi all,
I have two x y z coordinates and I need the path between these two points. It does not necessarily need to be the shortest distance path. I am working with a (3x30) position matrix. The first row represents x, the second row is y and the third row is z.
Point 1: (x1,y1,z1)
Point 30: (x30,y30,z30)
Position matrix: [x1 .......... x30
y1 .......... y30
z1 .......... z30]
Point 1 and point 30 are given. I need something simple that will give me the remaining 28 points within the matrix.
Thanks in advance!
2 Kommentare
James Tursa
am 2 Jul. 2015
Bearbeitet: James Tursa
am 2 Jul. 2015
Any restrictions on the path? E.g., is a diagonal jump (two indexes changing at the same time) OK? Can indexes only change a max of 1 for each point?
Zena Assaad
am 2 Jul. 2015
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 2 Jul. 2015
0 Stimmen
See Steve's 5 part blog series on it: http://blogs.mathworks.com/steve/2011/11/01/exploring-shortest-paths-part-1/
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!