Main Content

dyadup

Dyadic upsampling of Laurent polynomial or Laurent matrix

Since R2021b

    Description

    example

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

    Note

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

    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 upsampling of a(z).

    dup = dyadup(a)
    dup = 
      laurentPolynomial with properties:
    
        Coefficients: [6 0 -5 0 4 0 -3 0 2 0 -1 0 0 0 1 0 -2 0 3 0 -4 0 5]
            MaxOrder: 12
    
    
    degree(dup)
    ans = 22
    

    Create two Laurent polynomials:

    • a(z)=2+4z-1+6z-2

    • b(z)=z+3+5z-1

    lpA = laurentPolynomial(Coefficients=[2 4 6],MaxOrder=0);
    lpB = laurentPolynomial(Coefficients=[1 3 5],MaxOrder=1);

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

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

    Obtain the dyadic upsampling of matA.

    matB = dyadup(matA);

    Inspect the elements of matB.

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

    Input Arguments

    collapse all

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

    Output Arguments

    collapse all

    Upsampled Laurent polynomial or Laurent matrix, returned as a laurentPolynomial object or a laurentMatrix object. Upsampling a Laurent polynomial P(z) by two results in the polynomial Q(z) = P(z2).

    Extended Capabilities

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

    Version History

    Introduced in R2021b