%% Example: Pulses and Oscillations
% Generate a signal sampled at 5 kHz for 4 seconds. The signal consists of a set of pulses of decreasing duration separated by regions of oscillating amplitude and fluctuating frequency with an increasing trend.

fs = 5000;
t = 0:1/fs:4-1/fs;

x = 10*besselj(0,1000*(sin(2*pi*(t+2).^3/60).^5));

%
% Compute and plot the short-time Fourier transform of the signal. Window the signal with a 200-sample Kaiser window with shape factor \beta =30.

stft(x,fs,'Window',kaiser(200,30))

% Copyright 2019 The MathWorks, Inc.