How can I save data to a .mat file the variables of the old .mat files aren't lost after saving new ones?
조회 수: 3 (최근 30일)
이전 댓글 표시
In my program, I need to save variables in each for loop and I want to save all variables after run all for loops in file result.mat. Howerver, when I save new variables, variables in previous for loop are lost. How can I save all data after finishing all for loop? Thank for your help!
댓글 수: 0
답변 (1개)
Azzi Abdelmalek
2016년 4월 30일
Use append option
a=10;
save('file','a')
b=20;
save('file','b','-append')
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!