MATLAB Programming

MATLAB Programming MATLAB Programming

cda.psych.uiuc.edu
from cda.psych.uiuc.edu More from this publisher
23.06.2015 Views

7 Working with Scientific Data Formats MATLAB Class Description Data Members Methods h5array Associates a name with an array. Data – Multidimensional array Name –Textstring specifying name of the object arr = hdf5.h5array creates an h5array object. arr = hdf5.h5array(data) creates an h5array object, where data specifies the value of the Data member. data can be numeric, a cell array, or an HDF5 data type. setData(arr, data) sets the value of the Data member, where arr is an h5array object and data can be numeric, a cell array, or an HDF5 data type. setName(arr, name) sets the value of the Name member, where arr is an h5array object and name is a string or cell array. 7-22

Hierarchical Data Format (HDF5) Files MATLAB Class Description Data Members Methods h5compound Associates a name with a structure; you can define the field names in the structure and their values Data – Multidimensional array Name –Textstring specifying name of the object MemberNames –Text strings specifying name of the object C = hdf5.h5compound creates an h5compound object. C = hdf5.h5compound(n1,n2,...) creates an h5compound object, where n1, n2 and so on are text strings that specify field names. The constructor creates a corresponding data field for every member name. addMember(C, mName) creates a new field in the object C. mName specifies the name of the field. setMember(C, mName, mData) sets the value of the Data element associated with the field specified by mName, where C is an h5compound object and mData can be numeric or an HDF5 data type. setMemberNames(C, n1, n2,...) specifies the names of fields in the structure, where C is an h5compound object and n1,n2, and so on are text strings that specify field names. The method creates a corresponding data field for every name specified. setName(C, name) sets the value of the Name member, where C is an h5compound object and name is a string or cell array. 7-23

7 Working with Scientific Data Formats<br />

<strong>MATLAB</strong><br />

Class Description Data Members Methods<br />

h5array<br />

Associates a name<br />

with an array.<br />

Data –<br />

Multidimensional<br />

array<br />

Name –Textstring<br />

specifying name of<br />

the object<br />

arr = hdf5.h5array creates<br />

an h5array object.<br />

arr = hdf5.h5array(data)<br />

creates an h5array object,<br />

where data specifies the value<br />

of the Data member. data<br />

can be numeric, a cell array,<br />

or an HDF5 data type.<br />

setData(arr, data)<br />

sets the value of the Data member,<br />

where arr is an h5array object and<br />

data can be numeric, a cell array,<br />

or an HDF5 data type.<br />

setName(arr, name)<br />

sets the value of the Name member,<br />

where arr is an h5array object<br />

and name is a string or cell array.<br />

7-22

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

Saved successfully!

Ooh no, something went wrong!