How to save each iteration in cell array?
조회 수: 2 (최근 30일)
이전 댓글 표시
I am using for loop for each folders to save the value in each iteration. But, the problem is: it overrides the value and save only last iteration. How do I save each iteration in cell array for each folder in for loop?
댓글 수: 0
답변 (1개)
madhan ravi
2018년 10월 24일
편집: madhan ravi
2018년 10월 24일
c=cell(zeros(1,12))
for ii = 1:12. %edited after sir Image Analyst's comment
c{ii}= %do something;
end
댓글 수: 7
per isakson
2018년 10월 29일
Two thoughts
- Always provide the full error message. output is assigned values in many places
- See Debug a MATLAB Program and Examine Values While Debugging. It's tricky to spot the problem without being able to run the code.
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!