Table Of Contents

grpdelay

Version:
    Last Modified: March 15, 2017

    Computes the group delay of a filter.

    Syntax

    grpdelay(b)
    grpdelay(b, a)
    grpdelay(b, a, n)
    grpdelay(b, a, n, 'whole')
    grpdelay(b, a, n, f)
    grpdelay(b, a, n, 'whole', f)
    grpdelay(b, a, w)
    grpdelay(b, a, w, f)
    gd = grpdelay(b, a)
    gd = grpdelay(b, a, n)
    gd = grpdelay(b, a, n, 'whole')
    gd = grpdelay(b, a, n, f)
    gd = grpdelay(b, a, n, 'whole', f)
    gd = grpdelay(b, a, w)
    gd = grpdelay(b, a, w, f)
    [gd, fr] = grpdelay(b)
    [gd, fr] = grpdelay(b, a)
    [gd, fr] = grpdelay(b, a, n)
    [gd, fr] = grpdelay(b, a, n, 'whole')
    [gd, fr] = grpdelay(b, a, n, f)
    [gd, fr] = grpdelay(b, a, n, 'whole', f)
    [gd, fr] = grpdelay(b, a, w)
    [gd, fr] = grpdelay(b, a, w, f)

    Inputs

    b

    Forward filter coefficients. b is a real vector.

    a

    Backward filter coefficients. a is a real vector.

    Default: [1]

    n

    Number of frequencies to use. n is a nonnegative integer.

    Default: 512

    w

    Predefined frequencies. If you do not specify w, MathScript evaluates the frequency response at n points equally spaced around the upper half of the unit circle. w is a vector.

    f

    Sampling frequency. f is a scalar.

    'whole'

    Indicates that you want to use the whole unit circle.

    Outputs

    gd

    Group delay of the filter defined by a and b. gd is a real vector.

    fr

    Corresponding frequencies of the filter. fr is a real vector.

    Using Function without Output

    If you do not request an output, this function plots the group delay in the current plot window. grpdelay(b) is equivalent to grpdelay(b, [1], 512). grpdelay(b, a) is equivalent to grpdelay(b, a, 512).

    W = 0:0.01:0.5;
    A = [1];
    B = [1, 4, 1, 6];
    GD = grpdelay(B, A, W)
    
    b = [2, 3, 7, 1];
    a = [1, 7, 3, 10];
    n = 250;
    f = 20;
    [GD, FR] = grpdelay(b, a, n, 'whole', f)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics