matlab.io.hdfeos.sw.defVrtRegion
Namespace: matlab.io.hdfeos.sw
Subset on monotonic field or dimension
Syntax
regionID_out = defVrtRegion(swathID,regionID,vertObj,range)
Description
regionID_out = defVrtRegion(swathID,regionID,vertObj,range)
subsets
on a monotonic field or contiguous elements of a dimension. Whereas
defBoxRegion
and defTimePeriod
subset
along the 'Track'
dimension, this routine allows
the user to subset along any dimension. regionID
specifies the subsetted region from a previous call. vertObj
specifies
the dimension by which to subset. range
specifies
the minimum and maximum values for vertObj
.
If there is no current subsetted region, regionID
should
be 'noprevsub'
.
vertObj
can be either a dimension or a field.
If it is a dimension, then range
should consist
of dimension indices. If vertObj
corresponds to
a field, then range
should consist of the minimum
and maximum field values. vertObj
must be one-dimensional
in this case, and the its values must be monotonic.
This function corresponds to the SWdefvrtregion
function
in the HDF-EOS library C API.
Examples
import matlab.io.hdfeos.* swfid = sw.open('swath.hdf'); swathID = sw.attach(swfid,'Example Swath'); regionID = sw.defVrtRegion(swathID,'noprevsub','Bands',[450 600]); data = sw.extractRegion(swathID,regionID,'Spectra'); sw.detach(swathID); sw.close(swfid);