把nc数据批量保存为mat格式。
Mostra commenti meno recenti
想把文件夹里的所有nc数据都转存为mat格式,下面有一个循环,但是保存之后只有一个mat文件,请大神帮忙看一下,非常感谢
pathname='F:\葵花小时\201507\07\';
files=dir([pathname,'*.nc']);
for i=1:length(files)
filename=[pathname,files(i).name];
SST=ncread(filename,'sea_surface_temperature');
% SST=SST(6961:7441,1152:1584);
% sst(:,:,i)=SST;
save('.mat','SST')
end
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su MATLAB 快速入门 in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!