Please, help us to better serve our user community by answering the following short survey: https://www.hdfgroup.org/website-survey/
HDF5 2.0.0.258fa78
API Reference
Loading...
Searching...
No Matches
Examples from Learning the Basics

Navigate back: Main / Getting Started with HDF5 / Learning the Basics


HDF5 Examples

These examples are used in the Learning the Basics topic. See Compiling HDF5 Applications for details on compiling them. PLEASE NOTE that the example programs are listed in the order they are expected to be run. Some example programs use files created in earlier examples.

HDF5 Source Code Examples

These examples (C, C++, Fortran, Java, Python) are provided in the HDF5 source code and binaries.

Feature Examples Comments
Create a file C Fortran C++ Java Python
Create a dataset C Fortran C++ Java Python
Read and write to a dataset C Fortran C++ Java Python
Create an attribute C Fortran C++ Java Python
Create a group C Fortran C++ Java Python
Create groups in a file using absolute and relative paths C Fortran C++ Java Python
Create datasets in a group C Fortran C++ Java Python
Create a file and dataset and select/read a subset from the dataset C Fortran C++ Java Python Also see examples to Write by row (and column) below.
Create an extendible (unlimited dimension) dataset C Fortran C++ Java Python Also see examples to Extend by row (and column) below
Create a chunked and compressed dataset C Fortran C++ Java Python

See HDF5Mathematica for user-contributed HDF5 Mathematica Wrappers and Introductory Tutorial Examples. The examples use P/Invoke.

Additional Examples

These examples make minor changes to the tutorial examples.

Feature Examples
Write by row C Fortran
Write by column C Fortran
Extend by row C Fortran
Extend by column C Fortran

Navigate back: Main / Getting Started with HDF5 / Learning the Basics