# chirp (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info Download Help (Windows Only)

Owning Class: waveform generation

Requires: MathScript RT Module

## Syntax

h = chirp(a)

h = chirp(a, b)

h = chirp(a, b, c)

h = chirp(a, b, c, d)

h = chirp(a, b, c, d, e)

h = chirp(a, b, c, d, e, f)

h = chirp(a, b, c, d, e, f, g)

## Description

Generates a swept-frequency cosine wave.

Examples

## Inputs

Name Description
a Specifies the sampling time. a is a real array.
b Specifies the start frequency of the chirp wave when t = 0. b is a positive real number. The default is 0.
c Specifies a time point. c is a positive number. The default is 1.
d Specifies the final frequency of the chirp wave when t = c. d is a positive real number. The default is 100.
e Specifies alternate sweep methods. e is a string that can be either 'linear', 'quadratic', or 'logarithmic'. The default is 'linear'. If you specify 'logarithmic', d must be larger than b.
f Specifies the initial phase in degree. f is a real number. The default is 0.
g If you specify 'quadratic', you also can specify a g input. g is a string that accepts the following values.

 'concave' chirp generates samples of a quadratic swept-frequency signal whose spectrogram is a parabola with its concavity in the positive frequency axis. 'convex' chirp generates samples of a quadratic swept-frequency signal whose spectrogram is a parabola with its convexity in the positive frequency axis.

## Outputs

Name Description
h Returns the sampled swept-frequency cosine wave.

## Details

The following table lists the support characteristics of this function.

 Supported in the LabVIEW Run-Time Engine Yes Supported on RT targets Yes Suitable for bounded execution times on RT Not characterized

## Examples

X = 0:0.01:2;
Y = chirp(X, 100, 1, 200, 'quadratic');
plot(X, Y)