| Development Environment | ![]() |
Using the MATLAB HDF Utility API
In addition to the standard HDF APIs, listed in Table , ,, MATLAB supports an API of utility functions that are designed to make using HDF in the MATLAB environment easier.
For example, the MATLAB utility API includes a function, MLlistinfo, which you can use to view all types of open HDF identifiers, such as HDF SD file identifiers. MATLAB updates these lists whenever HDF identifiers are created or closed.
This code obtains a list of all open HDF file and data set identifiers, using the MLlistinfo function. In this example, only two identifiers are open.
hdfml('listinfo')
No open RI identifiers
No open GR identifiers
No open grid identifiers
No open grid file identifiers
No open annotation identifiers
No open AN identifiers
Open scientific dataset identifiers:
262144
Open scientific data file identifiers:
393216
No open Vdata identifiers
No open Vgroup identifiers
No open Vfile identifiers
No open point identifiers
No open point file identifiers
No open swath identifiers
No open swath file identifiers
No open access identifiers
No open file identifiers
Closing All Open HDF Identifiers
To close all open HDF identifiers in a single call, use the MLcloseall function. This call closes all open HDF identifiers.
hdfml('closeall')
| Including Metadata in an HDF File | Using Low-Level File I/O Functions | ![]() |