k-Wave Toolbox


Write MATLAB matrix to a k-Wave HDF5 file.


writeMatrix(filename, matrix, matrix_name)


writeMatrix writes a MATLAB matrix to an existing HDF5 file. If the HDF5 file specified by filename doesn't exist, it is automatically created. Matrix attributes required by the k-Wave C++ code are automatically added. All variables are stored as 3D matrices (with the size of unused dimensions set to 1), and complex matrices are reorganised to C++ format before storing.


filename name of HDF5 file to write matrix to
matrix data to write
matrix_filename string containing the name of the matrix

See Also