law:nroot
List of: Scheme Extensions
Subjects: Analyzing Models, Laws
Contents: Kernel

Action: Computes all of the roots of a law function over a given interval.

Filename: kern/kern_scm/law_scm.cxx

Syntax: (law:nroot law low-lim up-lim)

Arg Types: law law | string | real | position |


par-pos | gvector

low-lim real

up-lim real

Returns: (real | (real ...))

Description: Returns a list of numbers that represent the roots of the law over a given range.


law can be a defined law, a law string, or a constant number.


low-lim and up-lim are two real values that specify the interval.

Example: ; law:nroot

; Find the roots of a sine wave.

(law:nroot "sin(x)" 0 10)

;; (0 3.14159265358979 6.2831853071295


9.42477796085266)
PDF/KERN/14SCI.PDF
HTM/DATA/KERN/KERN/14SCI/0023.HTM