Save a "storage variable" in a different .mat file
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi all, I am running an iterative algorithm and I am saving the results of each iteration in a "storage variable", which is a cell-array called MC. Since I am running many iterations the storage variable MC becomes significantly big, slowing down a lot my algorithm. So I was wondering: is there a way to save my storage variable in a .mat file (maybe every TOT iteration), so that I can delete it and fasten my algorithm?
I know of the function "save" but I need to be able to write the new .mat file "incrementally" (in the sense that I'd like to be able to increase the variable defined in the new .mat file each time I save the MC variable not to overwrite it).
Is it possible?
Thanks!
P.S. I am not using the Parallel Toolbox, so no problems with different clusters and similars.
댓글 수: 0
답변 (1개)
Walter Roberson
2015년 9월 16일
You could look at matFile() in particular http://www.mathworks.com/help/matlab/ref/matfile.html#bt19yqz-1. But pay attention to the Limitations -- so you might need to switch to a structure array
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!