HDF4 Files
Hierarchical Data Format, Version 4 (HDF4) is a library and multi-object file format for storing and managing data between machines. You can interact with HDF4 files in two ways:
The MATLAB® high-level HDF4 functions provide a simplified programmatic interface for reading data from HDF4 files. You can also use the
imread
andimwrite
functions to read and write image data in HDF4 files.The MATLAB low-level HDF4 functions provide finer control over the reading and writing process of HDF4 files by providing access to more than 100 functions in the HDF4 and HDF-EOS2 C libraries. To export non-image data to an HDF4 file, you must use the low-level functions.
To use the MATLAB low-level HDF4 and HDF-EOS2 functions, you must be familiar with HDF4 and HDF-EOS2 C API programming concepts, described at
https://www.hdfgroup.org/solutions/hdf4/
.
MATLAB uses HDF4 C library version 4.2.16-2 and HDF-EOS2 C library version 3.
Functions
Topics
- Import HDF4 Files Using High-Level Functions
Read data and metadata using the Hierarchical Data Format, Version 4 (HDF4) file format.
- About HDF4 and HDF-EOS
Use HDF4 and HDF-EOS formats with MATLAB.
- Map HDF4 to MATLAB Syntax
Each HDF4 API includes many individual functions that you use to read data from files, write data to files, and perform other related functions.
- Import HDF4 Files Using Low-Level Functions
Read data from a scientific dataset in an HDF4 file, using the functions in the
matlat.io.hdf4.sd
namespace. - Export to HDF4 Files
Write MATLAB arrays to a scientific dataset in an HDF4 file.