Using a function in a 'for' loop?
Afficher commentaires plus anciens
My function must take a specified path through an array from one end to the other given a starting position.
For my function, I would like to get two outputs:
1) a 1D array of the row indices of the path
2) a 1D array of the column indices of the path
Is it possible to use a 'for' loop that calls to another function (this function will select the coordinates of the next position, and the next, etc.)? And how would I go about storing the indices to get my output?
2 commentaires
KSSV
le 10 Sep 2017
What array you have? What path? Explain your purpose.
TerribleAtCoding
le 10 Sep 2017
Modifié(e) : TerribleAtCoding
le 10 Sep 2017
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!