Signal Processing Toolkit User Guide > Reference (G to P) > P_SUM Function (PV-WAVE Extreme Advantage)
  

P_SUM Function (PV-WAVE Extreme Advantage)
Computes the sum of two polynomials.
Usage
result = P_SUM(a, b)
Input Parameters
a—The array of coefficients of the first polynomial.
b—The array of coefficients of the second polynomial.
Returned Value
result—An array of coefficients representing the sum of two polynomial coefficient arrays.
Keywords
None.
Discussion
Given two polynomials A(z) and B(z), such as:
A(z) = a0 + a1z–1 + a2z–2 + ... + aNz–N
and:
B(z) = b0 + b1z–1 + b2z–2 + ... + bMz–M
their polynomial sum is simply:
C(z) = A(z) + B(z)
The degree of the resulting polynomial C(z) is the maximum of the degrees (N and M) of the two supplied polynomials A(z) and B(z).
Example
In this example, two polynomials, A(z) = 1 + 3z–1 ,
and B(z) = 1 + 2z–1 + 2z–2 + z–3  are added together using P_SUM.
a = [1, 3]
b = [1, 2, 2, 1]
c = P_SUM(a, b)
PM, c
; 2
; 5
; 2
; 1
 

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.