Find first non-zero column of a matrix
Mostra commenti meno recenti
How do I, given a matriz A, tell MATLAB to find the index of the leftmost non-zero column of said matrix?
Risposta accettata
Più risposte (1)
Azzi Abdelmalek
il 27 Ago 2016
A=randi([0 2],20,8)
[~,out]=max(sum(logical(A)))
Categorie
Scopri di più su Resizing and Reshaping Matrices in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!