saving workspace variables individually?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello
Is there a way to save the variables in the workspace separately?
Say the workspace contains 50 variables (all arrays of double) , is there a way to save those 50 variables separately instead of saving them in one mat file?
댓글 수: 0
채택된 답변
Les Beckham
2023년 3월 27일
a = 1;
b = 2;
c = 3;
vars = who
for v = 1:numel(vars)
save(sprintf('%s.mat', vars{v}), vars{v})
end
dir
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!