Main Content

matlab.io.hdfeos.sw.extractPeriod

Namespace: matlab.io.hdfeos.sw

Read data from subsetted time period

Syntax

data = extractPeriod(swathID,periodID,fieldname)

Description

data = extractPeriod(swathID,periodID,fieldname) reads data for the given field for the time period specified by periodID.

This routine corresponds to the SWextractperiod function in the HDF-EOS library C API.

Examples

import matlab.io.hdfeos.*
swfid = sw.open('swath.hdf');
swathID = sw.attach(swfid,'Example Swath');
starttime =  25;
stoptime = 425;
periodID = sw.defTimePeriod(swathID,starttime,stoptime,'MIDPOINT');
data = sw.extractPeriod(swathID,periodID,'Temperature');
sw.detach(swathID);
sw.close(swfid);