k-Wave Toolbox

focus

Create input signal based on source mask and focus position.

Syntax

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

Description

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.

Inputs

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

Outputs

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