23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Hierarchical Data Format (HDF5) Files<br />

4 Write the enumerated data to a data set named objects in an HDF5 file.<br />

hdf5write('myfile3.h5', '/g1/objects', enum_obj);<br />

5 Read the enumerated data set from the file.<br />

ddd = hdf5read('myfile3.h5','/g1/objects')<br />

hdf5.h5enum:<br />

Name: ''<br />

Data: [2 1 3 3 2 3 2 1]<br />

EnumNames: {'RED' 'GREEN' 'BLUE'}<br />

EnumValues: [1 2 3]<br />

The following example creates an HDF5 string object.<br />

hdf5.h5vlen({0 [0 1] [0 2] [0:10]})<br />

hdf5.h5vlen:<br />

Name: ''<br />

Data: [0 0 1 0 2 0 1 2 3 4 5 6 7 8 9 10]<br />

The following example creates an HDF5 h5vlen object.<br />

hdf5.h5vlen({0 [0 1] [0 2] [0:10]})<br />

hdf5.h5vlen:<br />

Name: ''<br />

Data: [0 0 1 0 2 0 1 2 3 4 5 6 7 8 9 10]<br />

Details on the <strong>MATLAB</strong> HDF5 Data Classes. The following table gives<br />

information about the data members and methods of all of the <strong>MATLAB</strong><br />

HDF5 data classes.<br />

7-21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!