How to save workspace in a for loop?
이전 댓글 표시
Hello,
I want to save the workspace at each iteration (in a vector maybe). By doing this, I will be able to reach any workspace generated at any iteration.
Thank you.
댓글 수: 3
Geoff Hayes
2014년 11월 17일
Ibra - when you say that you want to save the workspace at each iteration do you mean that you want to save a particular variable or all variables at that iteration (like a snapshot)? Please provide more details concerning the variables. Depending upon how many there are, you may want to save all to a file or save all to a structure (which gets saved to an array/vector).
ibra
2014년 11월 18일
Image Analyst
2014년 11월 18일
Just have the variables be arrays. Assign the value to an array with the same index as the loop index (if it's sequential integers).
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!