finding the columns include ones
2 ビュー (過去 30 日間)
古いコメントを表示
matrix=[1 0 0 1 0;0 1 0 1 0];
% I need to find the number of column includes [1;1]
index_1 = 4 ;
% how can I find this using code or function?
0 件のコメント
採用された回答
madhan ravi
2024 年 1 月 6 日
index = find(all(matrix)) % one can directly use logical indexing without find() function
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!