How to save the data when we are using dir('*.hdf')
古いコメントを表示
I have opened all files using MOD= dir('*.hdf'); but cannot able to use this to open these files or to extract some values form these files. Here is my script
MOD= dir('*.hdf');
for i=1:365
Name=MOD(i).name
if i ==1
AE(i)=hdfread(Name,'/mod08/Data Fields/Angstrom_Exponent_Land_Mean', 'Index', {[1 1],[1 1],[180 360]});
AOD(i)=hdfread(Name, '/mod08/Data Fields/Optical_Depth_Land_And_Ocean_Mean', 'Index', {[1 1],[1 1],[180 360]});
else
AE(:,:,i)=hdfread(Name, '/mod08/Data Fields/Angstrom_Exponent_Land_Mean', 'Index', {[1 1],[1 1],[180 360]});
AOD(:,:,i)=hdfread(Name, '/mod08/Data Fields/Optical_Depth_Land_And_Ocean_Mean', 'Index', {[1 1],[1 1],[180 360]});
end
end
When I run this program, there is an error showing, Subscripted assignment dimension mismatch.
Error in test2 (line )
AE(i)=hdfread(MOD(i).name
,'/mod08/Data
Fields/Angstrom_Exponent_Land_Mean',
'Index', {[1 1],[1 1],[180 360]});
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Timetables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!