Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void PolyCoeff(TMtx Mtx, TVec Coeff) | Returns coefficients of the characteristic polynomial. |
| 2 | void PolyCoeff(TVec Roots, TVec Coeff) | Converts polynomial roots to coefficients. |
Overload 1: void PolyCoeff(TMtx Mtx, TVec Coeff)
Returns coefficients of the characteristic polynomial.
Result: stored in self (calling object)
Remarks:
Returns coefficients of the characteristic polynomial: det( Mtx - Lambda * I ).
Examples
using Dew.Math;
using Dew.Math.Units;
using Dew.Math.Editors;
namespace Dew.Examples
{
private void Example()
{
Vector Coeff = new Vector(0);
Matrix A = new Matrix(0,0);
A.SetIt(3,3,false, new double[] {1, 4, -1,
2, 1, 5,
3, -2, 0});
Polynoms.PolyCoeff(A,Coeff);
MtxVecEdit.ViewValues(Coeff,"Coefficients");
}
}
See Also: Polynoms.PolyRoots
Overload 2: void PolyCoeff(TVec Roots, TVec Coeff)
Converts polynomial roots to coefficients.
Result: stored in self (calling object)
Remarks:
The PolyCoeff procedure converts polynomial roots to coefficients. The following scheme is used to construct a coefficients from the roots:
P(x) = coeff[0] x^n + coeff[1] x^(n-1) + ... + coeff[n] = (x - roots[0]) ... (x - roots[n-1])
n .. order of the polynomial
The length and complex property of the Coeff object are set automatically. The inverse to this routine is Dew.Math.Units.Polynoms.PolyRoots