saving in different folders
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi
This is a statement in a for loop
[f_estimate(i), freqconf(i), z_estimate(i), dampconf(i)]
How do I save each of the variables in different folders?
댓글 수: 0
채택된 답변
Angelo Yeo
2023년 6월 19일
save(fullfile(basepath, 'folder1', 'f_estimate.mat'), 'f_estimate')
save(fullfile(basepath, 'folder2', 'freqconf.mat'), 'freqconf')
% etc ...
댓글 수: 0
추가 답변 (1개)
Ayush Kashyap
2023년 6월 19일
Hi Indrani,
As per my knowledge, you can utilize the "save" and "fullfile" functions provided by matlab inside your for loop as follows:
save(fullfile(<folder path>, ['f_estimate_' num2str(i) '.mat']), 'f_estimate', '-v7.3');
You can also refer to this documentation for more details: Matlab Save Function
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Solar Power에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!