How to save index of Values of an item in a matrix?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a matrix of of elements like
[0,0,0,1,0,0,0,0,1,0,1]
I'd like to go through the matrix and at each element where the value is greater than zero, I want to save the index to a new matrix such that the new matrix looks like:
[4, 9, 11]
0 commentaires
Réponses (1)
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!