k-Wave Toolbox


Interpolate data from a Cartesian to a binary sensor mask.


binary_sensor_data = interpCartData(kgrid, cart_sensor_data, cart_sensor_mask, binary_sensor_mask)
binary_sensor_data = interpCartData(kgrid, cart_sensor_data, cart_sensor_mask, binary_sensor_mask, interp)


interpCartData takes a matrix of time-series data recorded over a set of Cartesian sensor points given by cart_sensor_mask and computes the equivalent time-series at each sensor position on the binary sensor mask binary_sensor_mask using interpolation. The properties of binary_sensor_mask are defined by the k-Wave grid object kgrid. Two and three dimensional data are supported.


kgrid k-Wave grid object returned by kWaveGrid
cart_sensor_data original sensor data measured over cart_sensor_mask indexed as cart_sensor_data(sensor position, time)
cart_sensor_mask Cartesian sensor mask over which cart_sensor_data is measured
binary_sensor_mask binary sensor mask at which equivalent time-series are computed via interpolation

Optional Inputs

interp interpolation mode used to compute the time-series, both 'nearest' and 'linear' (two-point) modes are supported (default = 'nearest')


binary_sensor_data array of time-series corresponding to the sensor positions given by binary_sensor_mask


See Also

cart2grid, kspaceFirstOrder2D, kspaceFirstOrder3D, kWaveGrid