k-Wave Toolbox


Create input signal based on source mask and focus position.


input_signal_mat = focus(kgrid, input_signal, source_mask, focus_position, sound_speed)


focus takes a single input signal and a source mask and creates an input signal matrix (with one input signal for each source point). The appropriate time delays required to focus the signals at a given position in Cartesian space are automatically added based on the user inputs for focus_position and sound_speed.


kgrid k-Wave grid object returned by kWaveGrid
input_signal single time series input
source_mask matrix specifying the positions of the time varying source distribution (i.e., source.p_mask or source.u_mask)
focus_position position of the focus in Cartesian coordinates
sound_speed scalar sound speed


input_signal_mat matrix of time series following the source points using MATLAB's column-wise linear index ordering