Engee documentation

chirp

Page in progress.

Variable frequency cosine (chirp).

Library

EngeeDSP

Syntax

Function call

  • y = chirp(t, f0, t1, f1) — generates a cosine-wave signal with varying frequency at time points defined by t, The instantaneous frequency at a moment in time 0 is equal to f0, and the instantaneous frequency at time t1 is equal to f1.

  • y = chirp(t, f0, t1, f1, "quadratic", phi, shape) — also defines the shape of the shape signal spectrogram with a quadratically varying frequency.

  • y = chirp(_, cplx) — returns a real chirp if cplx is specified as "real", and returns a complex chirp if cplx is specified as "complex".

Arguments

Input arguments

# t — time

+ vector | the matrix

Details

Time, set as a vector or matrix. If you specify t using single precision data, then the function chirp generates a single precision signal y.

Data types

Float32, Float64

# f0 — initial frequency

+ 0 (by default) | scalar

Details

Instantaneous frequency in Hz at a moment in time 0, defined as a real scalar.

Data types

Float32, Float64

# t1 is the countdown time

+ 1 (by default) | scalar

Details

The reference time in seconds, set as a positive scalar.

Data types

Float32, Float64

# f1 — instantaneous frequency at a moment in time t1
100 (by default) | scalar

Details

Instantaneous frequency in Hz at a moment in time t1, defined as a real scalar.

Data types

Float32, Float64

# method — method of changing the instantaneous frequency

+ "linear" (default) | "quadratic" | "logarithmic"

Details

The method of changing the instantaneous frequency, specified as "linear", "quadratic", or "logarithmic":

  • "linear" — linear frequency change :

    where

    and, by default, the value . Ratio ensures that the desired reference frequency is maintained at a moment in time .

  • "quadratic" — quadratic frequency change :

    where

    and, by default, the value . If , then the default waveform is convex if , then the default waveform is concave.

  • "logarithmic" — logarithmic frequency change :

    where

    and, by default, the value .

Data types

Char, String

# phi — initial phase

+ 100 (default) | scalar

Details

The initial phase in degrees, set as a positive scalar;

Data types

Float32, Float64

# shape — the shape of a quadratic chirp + spectrogram "convex" | "concave"

Details

The shape of the quadratic chirp spectrogram, given as "convex" or "concave". Meaning shape describes the shape of a parabola relative to the axis of positive frequencies. By default, shape is "convex" When (swiping down), and "concave" When (swiping up).

chirp en

Data types

Char, String

# cplx — output complexity

+ "real" (by default) | "complex"

Details

The complexity of the output, given as "real" or "complex".

Data types

Char, String

Output arguments

# y is a cosine signal with varying frequency

+ vector

Details

A cosine signal with varying frequency, returned as a vector.