Save variables in a new directory (not current directory)
조회 수: 106 (최근 30일)
이전 댓글 표시
Hi. I'd save variables from the workspace into a file putting it into a new directory (not the curr dir). I use the command 'save' but it doesn't it! Thanking you for your attention, I'm looking forward for your answers.
댓글 수: 0
채택된 답변
Thomas
2012년 10월 23일
편집: Thomas
2012년 10월 23일
you have to use save with the entire path..
save('C:\My folder\filename','varname')
You could also look at the FULLFILE comamnd
doc fullfile
댓글 수: 3
Walter Roberson
2020년 2월 10일
We really recommend using fullfile instead of constructing folder names using strcat. It makes it easier to get the right path and makes the code more portable.
추가 답변 (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!