val = h5read(filename, location)
| Parameter | Description |
|---|---|
| filename | a string: hdf5 filename. |
| location | a string: full path identifying a data set. |
| Parameter | Description |
|---|---|
| val | a nelson's variable. |
h5read reads data set in location from the HDF5 file.
If location identifies a Nelson object group, h5read reconstructs the stored legacy class object or classdef value/handle object.
h5_directory = [modulepath('hdf5','tests'), '/h5'];
double_data = [h5_directory, '/h5ex_t_float.h5'];
R = h5read(double_data,'/DS1')
h5filename = [tempdir(), 'doc_h5read_class.h5'];
if isfile(h5filename) rmfile(h5filename) end
addpath([nelsonroot(), '/modules/overload/examples/complex']);
obj = complexObj(3, 4);
h5write(h5filename, '/obj', obj);
R = h5read(h5filename, '/obj');
class(R)
R.r
R.i
| Version | Description |
|---|---|
| 1.0.0 | initial version |
| 2.0.0 | Nelson class objects can be reconstructed from object metadata. |