k-Wave Toolbox |

# toneBurst

Create an enveloped single frequency tone burst

## Syntax

    signal = toneBurst(sample_freq, signal_freq, num_cycles)
    signal = toneBurst(sample_freq, signal_freq, num_cycles, ...)

## Description

`toneBurst` creates an enveloped single frequency tone burst for use in ultrasound simulations. If an array is given for the optional input `'SignalOffset'`, a matrix of tone bursts is created where each row corresponds to a tone burst for particular value of the `'SignalOffset'`. If a value for the optional input `'SignalLength'` is given, the tone burst/s are zero padded to this length (in samples). For example, running

    toneBurst(20e6, 1e6, 10, 'Plot', true);

will return and plot a 1 MHz tone burst with 10 cycles and a Gaussian envelope sampled at 20 MHz.

## Inputs

`sample_freq` | sampling frequency [Hz]
`signal_freq` | signal frequency [Hz]
`num_cycles` | number of sinusoidal oscillations

## Optional Inputs

Optional 'string', value pairs that may be used to modify the default computational settings.

Input | Valid Settings | Default | Description
--- | --- | --- | ---
`'Envelope'` | `'Gaussian'` `'Rectangular'` | `'Gaussian'` | Envelope used to taper the tone burst.
`'Plot'` | (Boolean scalar) | `false` | Boolean controlling whether the created tone burst is plotted.
| `'SignalLength'` | (integer) | `'auto'` | Signal length in number of samples. If longer than the tone burst length, the signal is appended with zeros. | `'SignalOffset'` | (integer) | `0` | Signal offset before the tone burst starts in number of samples.

## Outputs

`signal` | created tone burst

## Examples

- Steering A Linear Array
- Snell's Law And Critical Angle Reflection

## See Also

`gaussian`

© 2009-2014 Bradley Treeby and Ben Cox.