주요 콘텐츠

matlab.io.hdfeos.gd.nEntries

네임스페이스: matlab.io.hdfeos.gd

지정된 객체 수

구문

nentries = nEntries(gridID,entType)

설명

nentries = nEntries(gridID,entType)은 그리드에 있는 지정된 객체의 수를 반환합니다. entType'dims''fields'일 수 있습니다.

이 함수는 HDF-EOS 라이브러리 C API의 GDnentries 함수에 대응합니다.

예제

import matlab.io.hdfeos.*
fid = gd.open('grid.hdf');
gridID = gd.attach(fid,'PolarGrid');
ndims = gd.nEntries(gridID,'dims');
nflds = gd.nEntries(gridID,'fields');
gd.detach(gridID);
gd.close(fid);
fprintf('The number of dimensions is %d.\n', ndims);
fprintf('The number of fields is %d.\n', nflds);

참고 항목