Evaluate a chirp signal at time t. A chirp signal is a frequency swept cosine wave.
y = chirp(t) y = chirp(t,f0) y = chirp(t,f0,t1) y = chirp(t,f0,t1,f1) y = chirp(t,f0,t1,f1,form) y = chirp(t,f0,t1,f1,form,phase)
real vector of times (in seconds) to evaluate the chirp signal
a positive scalar: the frequency (in Hz) at time t=0 (default: 0). If set to [] the default value is used.
a positive scalar: the time (in seconds) t1 (default: 1). If set to [] the default value is used.
a positive scalar: frequency (in Hz) at time t=t1 (default: 100). If set to [] the default value is used.
a character string: the 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
The default value is "linear". If set to [] the default value is used.
a real scalar: the phase shift (in degree) at t=0 (default: 0). If set to [] the default value is used.
If you want a different sweep shape f(t), use the following: y = cos(2*%pi*integral(f(t)) + 2*%pi*f0*t + phase);
clf;gcf().color_map= jetcolormap(128); //Linear subplot(221); [TFR,T,F]=tfrsp(chirp([0:0.002:5])',1:2:2501,128); subTFR = linspace(1, size(TFR, 'c'), 100); grayplot(T(subTFR),F(1:$/2),TFR(1:$/2,subTFR)'); xtitle("linear, 0-100Hz in 1 sec") //Quadratic subplot(222); [TFR,T,F]=tfrsp(chirp([-2:0.001:15], 400, 10, 100, 'quadratic')',1:2:5001,128); subTFR = linspace(1, size(TFR, 'c'), 100); grayplot(T(subTFR),F(1:$/2),TFR(1:$/2,subTFR)'); xtitle("quadratic, 400 Hz at t=0 and 100 Hz at t=10") //Logarithmic subplot(223); [TFR,T,F]=tfrsp(chirp([0:1/8000:5], 200, 2, 500, "logarithmic")',1:20:40001,128); subTFR = linspace(1, size(TFR, 'c'), 100); grayplot(T(subTFR),F(1:$/2),TFR(1:$/2,subTFR)'); xtitle("logaritmic, 200 Hz at t=0 and 500 Hz at t=2") | ![]() | ![]() |