Main Content

dyaddown

Dyadic downsampling of Laurent polynomial or Laurent matrix

Since R2021b

    Description

    Q = dyaddown(P) downsamples by two the Laurent polynomial or Laurent matrix specified by P. If P is a Laurent matrix, dyaddown downsamples the matrix elements.

    Note

    The laurentPolynomial and laurentMatrix objects have their own versions of dyaddown. The input data type determines which version is executed.

    example

    Examples

    collapse all

    Create the Laurent polynomial a(z)=k=-56(-1)kkzk. Obtain the degree of a(z).

    cfs = (-1).^(-5:6).*(-5:6);
    a = laurentPolynomial(Coefficients=fliplr(cfs),MaxOrder=6)
    a = 
      laurentPolynomial with properties:
    
        Coefficients: [6 -5 4 -3 2 -1 0 1 -2 3 -4 5]
            MaxOrder: 6
    
    
    degree(a)
    ans = 
    11
    

    Obtain the degree of the dyadic downsampling of a(z).

    ddown = dyaddown(a)
    ddown = 
      laurentPolynomial with properties:
    
        Coefficients: [6 4 2 0 -2 -4]
            MaxOrder: 3
    
    
    degree(ddown)
    ans = 
    5
    

    Create two Laurent polynomials:

    • a(z)=k=05(6-k)z6-k

    • b(z)=k=05(k+1)z-k

    lpA = laurentPolynomial(Coefficients=[6:-1:1],MaxOrder=6);
    lpB = laurentPolynomial(Coefficients=[1:6],MaxOrder=0);

    Create the Laurent matrix matA = [a(z)12b(z)].

    matA = laurentMatrix(Elements={lpA,1;2,lpB});

    Obtain the dyadic downsampling of matA.

    matB = dyaddown(matA);

    Inspect the elements of matB.

    matB.Elements{1,1}
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: [6 4 2]
            MaxOrder: 3
    
    
    matB.Elements{1,2}
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: 1
            MaxOrder: 0
    
    
    matB.Elements{2,1}
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: 2
            MaxOrder: 0
    
    
    matB.Elements{2,2}
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: [1 3 5]
            MaxOrder: 0
    
    

    Input Arguments

    collapse all

    Laurent polynomial or Laurent matrix, specified as a laurentPolynomial object or a laurentMatrix object, respectively.

    Output Arguments

    collapse all

    Downsampled Laurent polynomial or Laurent matrix, returned as a laurentPolynomial object or a laurentMatrix object. Downsampling a Laurent polynomial P(z)=k=Ckzk by two results in the polynomial Q(z)=k=C2kzk.

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2021b