k-Wave Toolbox |

# makeTime

Create an evenly spaced array of time points

## Syntax

    [t_array dt] = makeTime(kgrid, c)
    [t_array dt] = makeTime(kgrid, c, cfl)

## Description

`makeTime` creates an evenly spaced array of time points for use with the first-order k-space simulation codes based on the Courant-Friedrichs-Lewy stability level `cfl` and the grid size. The time-step `dt` is chosen based on the `cfl` level(the default setting is 0.3), and the number of time-steps is chosen based on the time it takes to travel from one corner of the k-space grid given by `kgrid` to the geometrically opposite corner travelling at `c` m/s. Note, if c is given as a matrix, the calculation is based on the maximum value.

## Inputs

`kgrid` | k-Wave grid structure returned by `makeGrid`
`c` | sound speed in the medium [m/s]

## Optional Inputs

`cfl` | Courant-Friedrichs-Lewy stability criterion (default = 0.3)

## Outputs

`t_array` | array of evenly-spaced time points [s]
`dt` | time-step [s]

## Examples

- 2D FFT Reconstruction For A Line Sensor
- 3D FFT Reconstruction For A Planar Sensor
- 2D Time Reversal Reconstruction For A Line Sensor
- 2D Time Reversal Reconstruction For A Circular Sensor
- 3D Time Reversal Reconstruction For A Planar Sensor
- 3D Time Reversal Reconstruction For A Spherical Sensor
- Point Source In A Homogeneous Propagation Medium
- Simulating Transducer Field Patterns
- Steering A Linear Array
- Snells Law And Critical Angle Reflection
- Simulations In Three-Dimensions

## See Also

`makeGrid`, `kspaceFirstOrder1D`, `kspaceFirstOrder2D`, `kspaceFirstOrder3D`

© 2009, 2010 Bradley Treeby and Ben Cox.