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 h5enum Defines an enumerated type; you can specify the enumerations (text strings) and the values they represent Data – Multidimensional array Name –Textstring specifying name of the object EnumNames –Text string specifying the enumerations, that is, the text strings that represent values EnumValues – values associated with enumerations E = hdf5.h5enum creates an h5enumobject. E = hdf5.h5enum(eNames, eVals) creates an h5enum object, where eNames is a cell array of strings, and eVals is vector of integers. eNames and eVals must have the same number of elements. defineEnum(E, eNames, eVals) defines the set of enumerations with the integer values they represent where eNames is a cell array of strings, and eVals is vector of integers. eNames and eVals must have the same number of elements. enumdata = getString(E) returns a cell array containing the names of the enumerations, where E is an h5enum object. setData(E, eData) sets the value of the object’s Data member, where E is an h5enum object and eData is a vector of integers. setEnumNames(E, eNames) specifies the enumerations, where E is an h5enum object and eNames is a cell array of strings. 7-24 setEnumValues(E, eVals) specifies the value associated with each enumeration, where E is an h5enum object and eVals is a vector of integers.

Hierarchical Data Format (HDF5) Files MATLAB Class Description Data Members Methods h5string Associates a name with a text string and provides optional padding behavior Data – Multidimensional array Name –Textstring specifying name of the object Length – Scalar defining length of string Padding –Type of padding to use: 'spacepad' 'nullterm' 'nullpad' str = hdf5.h5string creates an h5string object. str = hdf5.h5string(data) creates an h5string object, where data is a text string. str = hdf5.h5string(data, padtype) creates an h5stringobject, where data is a text string and padtype specifies the type of padding to use. setData(str, data) sets the value of the object’s Data member, where str is an h5string object anddata is a text string. setLength(str, lenVal) sets the value of the object’s Length member, where str is an h5string object and lenVal is a scalar. setName(str, name) sets the value of the object’s Name member, where str is an h5string object and name is a string or cell array. setPadding(str, padType) specifies the value of the object’s Padding member, where str is an h5string object and padType is a text string specifying one of the supported pad types. h5vlen Associates a name with an array Data – Multidimensional array Name –Textstring V = hdf5.h5vlen creates an h5array object. V = hdf5.h5vlen(data)creates an h5array object, where 7-25

Hierarchical Data Format (HDF5) Files<br />

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

Class Description Data Members Methods<br />

h5string<br />

Associates a name<br />

with a text string<br />

and provides<br />

optional padding<br />

behavior<br />

Data –<br />

Multidimensional<br />

array<br />

Name –Textstring<br />

specifying name<br />

of the object<br />

Length –<br />

Scalar defining<br />

length of string<br />

Padding –Type<br />

of padding to use:<br />

'spacepad'<br />

'nullterm'<br />

'nullpad'<br />

str = hdf5.h5string creates<br />

an h5string object.<br />

str = hdf5.h5string(data)<br />

creates an h5string object, where<br />

data is a text string.<br />

str = hdf5.h5string(data,<br />

padtype) creates an<br />

h5stringobject, where<br />

data is a text string and<br />

padtype specifies the<br />

type of padding to use.<br />

setData(str, data)<br />

sets the value of the object’s<br />

Data member, where str<br />

is an h5string object<br />

anddata is a text string.<br />

setLength(str,<br />

lenVal) sets the value of the<br />

object’s Length member, where<br />

str is an h5string object<br />

and lenVal is a scalar.<br />

setName(str, name)<br />

sets the value of the object’s<br />

Name member, where str is<br />

an h5string object and name<br />

is a string or cell array.<br />

setPadding(str,<br />

padType) specifies the value of the<br />

object’s Padding member, where<br />

str is an h5string object and<br />

padType is a text string specifying<br />

one of the supported pad types.<br />

h5vlen<br />

Associates a name<br />

with an array<br />

Data –<br />

Multidimensional<br />

array<br />

Name –Textstring<br />

V = hdf5.h5vlen creates<br />

an h5array object.<br />

V = hdf5.h5vlen(data)creates<br />

an h5array object, where<br />

7-25

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

Saved successfully!

Ooh no, something went wrong!