Iterating over Columns/Rows (no index)
10 ビュー (過去 30 日間)
古いコメントを表示
Standard way to iterate over matrix columns or rows is to use an incrementing iterator and index the matrix from there.
Are there alternative ways to do this?
Similar to iterating over vector values, like this:
for value = some_vector
...
end
0 件のコメント
回答 (1 件)
Yongjian Feng
2021 年 11 月 21 日
編集済み: Yongjian Feng
2021 年 11 月 21 日
If the array is a row vector, then it works
a = [1 2 3]
for i = a
disp(i)
end
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!