# trimCartPoints

Remove Cartesian points that are not within a kgrid.

## Syntax

    points = trimCartPoints(kgrid, points)

## Description

`trimCartPoints` filters a `dim x num_points` array of Cartesian points so that only those within the bounds of a given `kgrid` remain.

## Inputs

`kgrid` | k-Wave grid object returned by `kWaveGrid`
`points` | `dim x num_points` array of Cartesian coordinates to trim [m]

## Outputs

`points` | `dim x num_points` array of Cartesian coordinates array of Cartesian coordinates that lie within the grid defined by `kgrid` [m]

## See Also

`cart2grid`, `grid2cart`