把nc数据批量保存为mat格式。
Show older comments
想把文件夹里的所有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
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB 快速入门 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!