Iterating over Columns/Rows (no index)
이전 댓글 표시
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
답변 (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
카테고리
도움말 센터 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!