Logical indexing returns different dimensions
古いコメントを表示
a = [3, 2]
b = [1; 1] == 1
a(b) % returns a 1x2 array
a = [3, 2; 4, 5]
b = [1; 1; 1; 1] == 1
a(b) % returns a 4x1 array
1 件のコメント
Umesh Kumar Singla
2023 年 1 月 12 日
編集済み: Umesh Kumar Singla
2023 年 1 月 12 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!