Add two polynomials coefficient by coefficient.
Numeric.poly.add(first, right)Aligns coefficients and sums them entry by entry.
- Parameters:
first: Coefficients of the first polynomialright: Coefficients of the second polynomial
- Returns: Coefficients of the summed polynomial
- NumPy: Covers
np.polynomial.polynomial.polyadd,np.polynomial.chebyshev.chebadd,np.polynomial.legendre.legadd,np.polynomial.hermite.hermadd,np.polynomial.hermite_e.hermeadd,np.polynomial.laguerre.lagadd,np.polyaddthrough a single Numerix method.
import Numeric from '@neabyte/numerix'
const coefficients = Numeric.poly.add([1, 2], [3, 4])
console.log(coefficients)
// [4,6]import Numeric from '@neabyte/numerix'
const coefficients = Numeric.poly.add([1, 2, 3], [1])
console.log(coefficients)
// [2,2,3]import Numeric from '@neabyte/numerix'
const coefficients = Numeric.poly.add([1, 2], [5])
console.log(coefficients)
// [6,2]import Numeric from '@neabyte/numerix'
const coefficients = Numeric.poly.add([2], [3])
console.log(coefficients)
// [5]