make use of dynamic mkdir
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi
How do I make use of mkdir so that its value changes?
I have data from 2015 to 2022. I have analysed the data and now need to save the data monthly for each year. So, I am trying to create a parent folder for saving the years. Indise each parent folder, I want to have a monthly folder.
댓글 수: 0
채택된 답변
Steven Lord
2023년 6월 19일
Use the function form of mkdir rather than the command form.
cd(tempdir)
mkdir 1985379 % command form, creating a place for use to write in
cd 1985379
dir % show that the directory is empty
month = "June";
year = 2023;
newfoldername = month + year
mkdir(newfoldername) % function form
dir % directory is no longer empty
댓글 수: 4
Walter Roberson
2023년 6월 20일
and now need to save the data monthly for each year
It is not obvious to me how the monthly data for each year is being represented. You currently only summarize by hour within each file; you have no code at present to summarize by day or month.
추가 답변 (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!