필터 지우기
필터 지우기

Save a "storage variable" in a different .mat file

조회 수: 1 (최근 30일)
Nicola Donelli
Nicola Donelli 2015년 9월 16일
답변: Walter Roberson 2015년 9월 16일
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.

답변 (1개)

Walter Roberson
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

카테고리

Help CenterFile 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!

Translated by