File: derivative.man

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (46 lines) | stat: -rw-r--r-- 927 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.TH derivative 1 "April 1993" "Scilab Group" "Scilab Function"
.so ../sci.an 
.SH NAME
derivative- approximate derivative
.SH CALLING SEQUENCE
.nf
J=derivative(f,x0,h)
[J,J2]=derivative(f,x0,h)
.fi
.SH PARAMETERS
.TP 10
f
: Scilab function \fVf: R^n --> R^p\fR 
.TP
x0  
: real column vector (of dimension n)
.TP
h
: (small) positive real number (default is 1.d-7)
.TP
J
: real p x n Jacobian matrix 
.TP
J2 
: real p x (p*n)  matrix
.SH DESCRIPTION
Approximate derivatives of a function f: \fVR^n --> R^p\fR.
.nf
f(x) = f(x0) + D1f(x0) *dx + 1/2* D2f(x0) *(dx.*.dx) +...
J = D1f(x0) ; J2=D2f(x0)
.fi
Derivatives are evaluated by finite difference:f_i(x+h)-f_i(x))/h.
Caution: h should be carefully chosen...
.SH EXAMPLE
.nf
deff('y=f(x)','y=[sin(x(1))*cos(x(2));x(1)^2*x(2)^2;1+x(1)*x(2)^2]')
x0=[1;2];eps=0.001;h=eps*[2;5];
[J,J2]=derivative(f,x0);
[f(x0+h)-f(x0)-J*h ,0.5*J2*(h.*.h)]
.fi
.SH SEE ALSO
mtlb_diff, derivat