複数のファイルを読み込む方法について
이전 댓글 표시
data_2000_0115.nc4,data_2000_0215.nc4,data_2000_0315.nc4,...,data_2000_1015.nc4,data_2000_1115.nc4,data_2000_1215.nc4
data_2001_0115.nc4,data_2001_0215.nc4,data_2001_0315.nc4,...,data_2001_1015.nc4,data_2001_1115.nc4,data_2001_1215.nc4
...があります(1~12月,2000年以降の1ヶ月ごとのnetcdfデータ)。
このように,複数あるファイルを変数だけ取り出して閉じて,またファイルを開けて...という繰り返しを行いたい時にどのようにすればよろしいでしょうか。
numfiles=9;
for k=1:numfiles
filename=sprintf('data_2000_0%d15.nc4',k)
end
上記のままだと%dに入るのが9までしかできず,10~12月のデータを開くことができません。
上記のような形をベースに考えたいと思っていますが,どのようにすればよろしいでしょうか。
よろしくお願いいたします。
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!