How to obtain paths from coordinates?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Francesco
am 4 Feb. 2014
Kommentiert: Image Analyst
am 22 Mär. 2014
I have a .txt formatted in this way:
2 Kommentare
Walter Roberson
am 4 Feb. 2014
Are these "all the paths that are a single step", or do they include multi-step paths? Full connectivity is to be assumed?
Image Analyst
am 22 Mär. 2014
Francesco, please don't edit your posts so as to destroy them and make people's answers meaningless and confusing. They may elect not to help you in the future if you do that.
Akzeptierte Antwort
Walter Roberson
am 5 Feb. 2014
[X, Y] = ndgrid(1:N);
identifiers = arrayfun(@(X,Y) sprintf('%d_%d', X, Y), X, Y, 'Uniform', 0);
Now just remove the diagonal ones and reshape into whatever order you want.
I do not understand how you want the distance to fit into this, or why you want to generate these identifiers.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Elementary Math finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!