%% Group Delays of Digital Down Converter
% Compute the group delays of the digital down converter using the groupDelay function.
% Create a dsp.DigitalDownConverter System object with the default settings.

dwnConv = dsp.DigitalDownConverter

% Use the groupDelay function to compute the vector of group delays. By default, the function evaluates the group delays at 8192 frequency points equally spaced around the upper half of the unit circle.

D = groupDelay(dwnConv);

% Plot the vector of group delays.

plot(D)
xlabel('Number of frequency points')
ylabel('Group delay')

% Determine the vector of frequencies over which the group delays are computed and plot them.

[D,F] = groupDelay(dwnConv);
plot(F,D)
xlabel('Frequencies')
ylabel('Group delay')

% Copyright 2018 The MathWorks, Inc.