# flyThrough

Display a three-dimensional matrix slice by slice.

## Syntax

    flyThrough(mat)
    flyThrough(mat, dim)
    flyThrough(mat, dim, fps)
    flyThrough(mat, dim, fps, loop)

## Description

`flyThrough` produces an animated visualisation of the data within a three-dimensional matrix `mat` by displaying the matrix slice by slice using `imagesc` and the colormap returned by `getColorMap`. A constant scaling parameter is automatically computed using the maximum value within `mat`.

## Inputs

`mat` | the three-dimensional matrix to visualise

## Optional Inputs

`dim` | matrix dimension through which the slices are taken (default = `1`)
`fps` | maximum number of frames per second to display (default = `5`)
`loop` | number of times to loop the animation (default = `1`)

Note The maximum achievable `fps` is determined by the speed at which the image slices can be extracted and displayed.

## Examples

- Simulations In Three-Dimensions
- 3D FFT Reconstruction For A Planar Sensor

## See Also

`getColorMap`, `imagesc`