CPolynomial:Init CPolynomial:Remove

CPolynomial:MaxOrder


The MaxOrder method returns the order of the maximum order coefficient that has been initialized.

Syntax

order = CPolynomial:MaxOrder()

bullet.gif    On success, this method returns order as an integer number.

bullet.gif    On failure, this method returns 0.

Example

Suppose that the CPolynomial P contains 3 coefficients with the highest order being 5. This script returns the maximum order defined:

 

P = new_polynomial()

-- create a CPolynomial

P:Set( 0, 5.5)

-- set coef[0]

P:Set( 1, 0.144)

-- set coef[1]

P:Set( 5, -0.15221e-12)

-- set coef[5]

nMax = P:MaxOrder()

-- get the maximum defined order

Printf("MaxOrder = %d", nMax)

-- result: MaxOrder = 5

Related Topics

CPolynomial, Exists


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.