Main Content

polyscale

Scale roots of polynomial

    Description

    b = polyscale(a,alpha) scales the roots of a polynomial in the z-plane, where a contains the polynomial coefficients and alpha is the scaling factor. The polyscale function returns the scaled polynomial coefficients b.

    example

    Examples

    collapse all

    Express the solutions to the equation x7=1 as the roots of a polynomial. Plot the roots in the complex plane.

    pp = [1 0 0 0 0 0 0 -1];
    zplane(pp,1)

    Figure contains an axes object. The axes object with title Pole-Zero Plot, xlabel Real Part, ylabel Imaginary Part contains 4 objects of type line, text. One or more of the lines displays its values using only markers

    Scale the roots of p in and out of the unit circle. Plot the results.

    hold on
    
    for sc = [1:-0.2:0.2 1.2 1.4]
        b = polyscale(pp,sc);
        plot(roots(b),"o")
    end
    
    axis([-1 1 -1 1]*1.5)
    
    hold off

    Figure contains an axes object. The axes object with title Pole-Zero Plot, xlabel Real Part, ylabel Imaginary Part contains 11 objects of type line, text. One or more of the lines displays its values using only markers

    Load a speech signal sampled at Fs=7418Hz. The file contains a recording of a female voice saying the word "MATLAB®."

    load mtlb

    Model a 100-sample section of the signal using a 12th-order autoregressive polynomial. Perform bandwidth expansion of the signal by scaling the roots of the autoregressive polynomial by 0.85.

    Ao = lpc(mtlb(1000:1100),12);
    Ax = polyscale(Ao,0.85);

    Plot the zeros, poles, and frequency responses of the models.

    tiledlayout(2,2)
    nexttile(1)
    zplane(1,Ao)
    title("Original")
    
    nexttile(3)
    zplane(1,Ax)
    title("Flattened")
    
    nexttile([2 1])
    [ho,w] = freqz(1,Ao);
    [hx,w] = freqz(1,Ax);
    plot(w/pi,abs([ho hx]))
    legend("Original","Flattened")

    Figure contains 3 axes objects. Axes object 1 with title Original, xlabel Real Part, ylabel Imaginary Part contains 4 objects of type line, text. One or more of the lines displays its values using only markers Axes object 2 with title Flattened, xlabel Real Part, ylabel Imaginary Part contains 4 objects of type line, text. One or more of the lines displays its values using only markers Axes object 3 contains 2 objects of type line. These objects represent Original, Flattened.

    Input Arguments

    collapse all

    Input polynomial coefficients, specified as a row vector or as a matrix. If you specify a as a matrix, polyscale considers each row as an independent vector of input polynomial coefficients.

    Data Types: single | double
    Complex Number Support: Yes

    Scaling factor, specified as a scalar or as a vector. If you specify alpha as a row vector, alpha must have as many elements as rows in a.

    Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
    Complex Number Support: Yes

    Output Arguments

    collapse all

    Scaled polynomial coefficients, returned as a row vector or as a matrix with the same size and data type as a.

    Tips

    Reducing the radius of the roots in an autoregressive polynomial expands (flattens) the bandwidth of the spectral peaks in the frequency response. This operation is often referred to as bandwidth expansion.

    Version History

    Introduced before R2006a

    See Also

    |