Find first non-zero column of a matrix
古いコメントを表示
How do I, given a matriz A, tell MATLAB to find the index of the leftmost non-zero column of said matrix?
採用された回答
その他の回答 (1 件)
Azzi Abdelmalek
2016 年 8 月 27 日
A=randi([0 2],20,8)
[~,out]=max(sum(logical(A)))
カテゴリ
ヘルプ センター および File Exchange で Resizing and Reshaping Matrices についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!