Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Indexing an an array
조회 수: 1 (최근 30일)
이전 댓글 표시
I have n arrays with different lengths. I want to index these n arrays in a for loop. How do I index n arrays of different lengths from 1 to n?
Thank you.
댓글 수: 1
Stephen23
2018년 4월 25일
편집: Stephen23
2018년 4월 25일
Simple: put them into a cell array, and then use an index. Indexing is neat, very efficient, and easy to debug.
Whatever you do, do NOT try to magically access the variable names in a loop. Dynamically accessing variable names in a loop is slow, complex, buggy, and hard to debug. Read more here:
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!