k-Wave Toolbox |

# writeMatrix

Write MATLAB matrix to HDF5 file

## Syntax

    writeMatrix(filename, matrix, matrix_name)

## Description

`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 k-Wave++ are automatically added. Complex matrices are reorganised to C++ format before storing. All variables are stored as 3D matrices.

## Inputs

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

## See Also

`h5write`

© 2009-2012 Bradley Treeby and Ben Cox.