SL.Newtons: SL.Newtons

Description Usage Arguments Value Examples

Description

an example function solving solutions of nonlinear equations by Newton method

Usage

1
SL.Newtons(fun, x, ep = 1e-05, it_max = 100)

Arguments

fun

functions consisting of equations

x

initial variable

ep

accuracy

it_max

the maximum number of iterations

Value

solutions of nonlinear equations

Examples

1
2
3
4
5
6
funs<-function(x){
f<-c(x[1]^2+x[2]^2-5, (x[1]+1)*x[2]-(3*x[1]+1))
J<-matrix(c(2*x[1], 2*x[2], x[2]-3, x[1]+1), nrow=2)
list(f=f,J=J)
}
SL.Newtons(funs, c(0,1))

Shulei95/Statcomp18046 documentation built on May 5, 2019, 11:06 p.m.