k-Wave Toolbox
k-Wave Toolbox Previous   Next


If you are unable to run the examples or see the help files included within the k-Wave Toolbox, first check that the k-Wave Toolbox has been added to the MATLAB path. To add a directory to the MATLAB path, either use the addpath command or go to File/Set Path/Add Folder on the dropdown menus in the main MATLAB window and select the root k-Wave Toolbox folder. You will need to restart MATLAB before the help files will appear in the help browser.

If you are encountering problems using specific combinations of inputs using Octave or older versions of MATLAB, try turning the display off by setting the optional input parameter 'PlotSim' to false, using a binary sensor mask or setting 'CartInterp' to 'nearest', and using the default settings for 'DataCast' (optional inputs are given as 'string', value pairs following the kgrid, medium, source, and sensor inputs).

If you are still having problems go to the online k-Wave User Forum and search for an answer or post a question.

 Back to Top

Compatability with earlier MATLAB versions

To use k-Wave for 3D simulations with MATLAB versions prior to 2008a, open kspaceFirstOrder3D from the main toolbox folder and replace catch ME on line 955 with catch. For some versions of MATLAB, the linear interpolation functions are also not supported. In this case, use a binary sensor mask, or set the optional input 'CartInterp' to 'nearest'. The ultrasound simulation examples will only work in versions of MATLAB recent enough to support user defined classes. The 'SaveToDisk' option used by writeMatrix and kspaceFirstOrder3DC requires MATLAB 2011a or later (for h5create).

 Back to Top

© 2009-2014 Bradley Treeby and Ben Cox.