I have several files of different name such as SOx_AGRICULTURE_1x1km.nc or PM2.5_TRANSPORT_1x1km.nc. I have 40 files, my question is if I can open them as a "for" loop in matlab? In advance thank you very much for your response.
7 ビュー (過去 30 日間)
古いコメントを表示
I have several files of different name such as SOx_AGRICULTURE_1x1km.nc or PM2.5_TRANSPORT_1x1km.nc. I have 40 files, my question is if I can open them as a "for" loop in matlab?
In advance thank you very much for your response.
Best regards
0 件のコメント
採用された回答
KSSV
2016 年 6 月 15 日
Yes you can open them in a for loop.
ncfiles = dir('*.nc') ; % you are in the folder of nc files
%
Nfiles = length(ncfiles) ; % Total number of nc files
for i = 1:Nfiles % loop for each file
%%ncread
%%do what ever you want
end
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!