hdfread
Read data from HDF4 or HDF-EOS2 file
Syntax
Description
Note
The hdfread
function reads HDF4 data from HDF4 files or
HDF-EOS2 files. To read data from HDF5 files, use the h5read
function.
returns all the data in the specified HDF Scientific Data (SD) dataset from the specified
file.data
= hdfread(filename
,SDDatasetName
)
returns all the data in the specified HDF Vertex (V) dataset.data
= hdfread(filename
,VDatasetName
)
returns all the data in the specified field of the specified HDF-EOS Grid dataset.data
= hdfread(filename
,gridDatasetName
,Fields=fields
)
returns all the data in the specified fields and at the specified level of the specified
HDF-EOS Point dataset.data
= hdfread(filename
,pointDatasetName
,Fields=fields
,Level=level
)
returns all the data in the specified field of the specified HDF-EOS Swath dataset.data
= hdfread(filename
,swathDatasetName
,Fields=fields
)
returns
all the data in the dataset specified by the structure data
= hdfread(S
)S
. Use the
hdfinfo
function to generate the structure.
If the generated structure contains more than one dataset, indicate which dataset you want
the hdfread
function to read by specifying the field in the
S
structure that relates to a particular type of dataset and using
indexing.
specifies options using one or more name-value arguments in addition to any of the input
argument combinations in previous syntaxes. For example, to read 20 records from an HDF V
dataset, set data
= hdfread(___,Name=Value
)NumRecords
to 20
. For a quick
reference on the types of datasets and the name-value arguments they support, see Valid Argument Combinations.
returns the image data for the specified 24-bit raster image.data
= hdfread(filename
,IDatasetName24Bit
)
[
returns the image data and the colormap for the specified 8-bit raster image.data
,map
] = hdfread(filename
,IDatasetName8Bit
)
Examples
Input Arguments
Name-Value Arguments
Output Arguments
More About
Version History
Introduced before R2006a