You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Dew.Math.Units Namespace > Classes > Polynoms Class > Polynoms Methods > Polynoms.PolyRoots Method
Dew Math for .NET
ContentsIndexHome
Example
using Dew.Math; using Dew.Math.Units; using Dew.Math.Editors; namespace Dew.Examples { private void Example() { Vector Coeff = new Vector(0); Vector Roots = new Vector(0); // coefficients of the polynomial 1*x^2 - 2*x + 1: Coeff.SetIt(false, new double[] {1, -2, 1}); Polynoms.PolyRoots(Roots,Coeff); // Roots now hold the roots of the polynomial = [ 1, 1 ] // x^2 - 2x + 1 = (x - 1) * (x - 1) MtxVecEdit.ViewValues(Roots,"Roots"); } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.