k-Wave Toolbox |

# resize

Resize a matrix using `interp2` (2D) or `interp3` (3D).

## Syntax

    mat_rs = resize(mat, new_size)
    mat_rs = resize(mat, new_size, interp_mode)

## Inputs

`mat` | matrix to resize
`new_size` | desired matrix size in elements given by [Nx, Ny] in 2D and [Nx, Ny, Nz] in 3D. Here Nx is the number of elements in the row direction, Ny is the number of elements in the column direction, and Nz is the number of elements in the depth direction.

## Optional Inputs

`interp` | interpolation mode used by `interp2` and `interp3` (default = `'*linear'`)

## Outputs

`mat_rs` | resized matrix

## Examples

- Loading External Image Maps
- 2D Time Reversal For A Circular Sensor
- Optimising k-Wave Performance

## See Also

`interp2`, `interp3`

© 2009-2012 Bradley Treeby and Ben Cox.