CPolynomial:Set


The Set method sets a coefficient index to a target value. The index begins at 0.

Syntax

CPolynomial:Set( index, value )

bullet.gif    index is the coefficient index to set, beginning at 0.

bullet.gif    value is the target value to assign to assign.

Example

The following script sets 2 of the coefficient values. Other coefficients, such as Coef[3], remains undefined:

 

P = new_polynomial()

-- create a CPolynomial

P:Set(4, 0.112)

-- set coef[4]

P:Set(1, 5.5)

-- set coef[1]

Printf("coef[3]= %lg", P:Get(3))

-- result: coef[3] = 0

Related Topics

CPolynomial, Init


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