I wrote a M file which includes a circulation.I'd like to save the variable created in each cycle to the same M-file.However,it looks like that each cycle the new variable wrote in the file will cover the last one and only the variable in the final cycle could be saved if I put the code{save('filename.mat','variable'}in the circulation. How to solve it?
MATLAB: How to save variables to a specific M file dynamically without coverage of the next cycle in a circulation
cyclesave file
Best Answer