Main Content

matlab.io.hdfeos.sw.fieldInfo

Namespace: matlab.io.hdfeos.sw

Information about swath field

Syntax

[dimsizes,ntype,dimlist] = fieldInfo(swathID,fieldname)

Description

[dimsizes,ntype,dimlist] = fieldInfo(swathID,fieldname) returns the size, data type, and list of named dimensions for the specified swath geolocation or data field.

This function corresponds to the SWfieldinfo function in the HDF-EOS library C API, but because MATLAB® uses FORTRAN-style ordering, the dimlist parameter is reversed with respect to the C library API.

Examples

import matlab.io.hdfeos.*
swfid = sw.open('swath.hdf');
swathID = sw.attach(swfid,'Example Swath');
[fieldSize,ntype,dimlist] = sw.fieldInfo(swathID,'Spectra');
sw.detach(swathID);
sw.close(swfid);