How to save workspace in a for loop?
Show older comments
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 Comments
Geoff Hayes
on 17 Nov 2014
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
on 18 Nov 2014
Image Analyst
on 18 Nov 2014
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).
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!