Signal Toolkit - chirp
- Function File: chirp
(t)
- Function File: chirp
(t, f0)
- Function File: chirp
(t, f0, t1)
- Function File: chirp
(t, f0, t1, f1)
- Function File: chirp
(t, f0, t1, f1, shape)
- Function File: chirp
(t, f0, t1, f1, shape, phase)
-
Evaluate a chirp signal at time t. A chirp signal is a frequency swept cosine wave.
- t
vector of times to evaluate the chirp signal
- f0
frequency at time t=0 [ 0 Hz ]
- t1
time t1 [ 1 sec ]
- f1
frequency at time t=t1 [ 100 Hz ]
- shape
shape of frequency sweep ’linear’ f(t) = (f1-f0)*(t/t1) + f0 ’quadratic’ f(t) = (f1-f0)*(t/t1)^2 + f0 ’logarithmic’ f(t) = (f1/f0)^(t/t1) * f0
- phase
phase shift at t=0
For example:
specgram (chirp ([0:0.001:5])); # default linear chirp of 0-100Hz in 1 sec specgram (chirp ([-2:0.001:15], 400, 10, 100, "quadratic")); soundsc (chirp ([0:1/8000:5], 200, 2, 500, "logarithmic"), 8000);
If you want a different sweep shape f(t), use the following:
y = cos (2 * pi * integral (f(t)) + phase);