From b3dee89661f7ad319793e5ffac347ef471a70e5b Mon Sep 17 00:00:00 2001 From: Stanislav KROTER Date: Mon, 24 Sep 2012 06:27:11 +0600 Subject: [PATCH] Revision of help page for numdiff (en_US). Change-Id: I378981112dbd893e00ee9dc2cdae02a686353c12 --- .../differential_equations/help/en_US/numdiff.xml | 43 ++++++++++---------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/scilab/modules/differential_equations/help/en_US/numdiff.xml b/scilab/modules/differential_equations/help/en_US/numdiff.xml index a4fbf14..b5bfdbf 100644 --- a/scilab/modules/differential_equations/help/en_US/numdiff.xml +++ b/scilab/modules/differential_equations/help/en_US/numdiff.xml @@ -17,7 +17,7 @@ Calling Sequence - g=numdiff(fun,x [,dx]) + g = numdiff(fun, x [,dx]) Arguments @@ -34,23 +34,23 @@ x - vector, the argument of the function - fun + a vector, the argument of the function + fun. dx - vector, the finite difference step. Default value is - dx=sqrt(%eps)*(1+1d-3*abs(x)) + a vector, the finite difference step. Default value is + dx=sqrt(%eps)*(1+1d-3*abs(x)). g - vector, the estimated gradient + a vector, the estimated gradient. @@ -58,24 +58,24 @@ Description - given a function fun(x) from - R^n to R^p computes the matrix - g such as + Given a function fun(x) from + R^n to R^p computes the matrix + g such as - using finite difference methods. Uses an order 1 formula. - Without parameters, the function fun calling sequence is - y=fun(x), and numdiff can be called as - g=numdiff(fun,x). Else the function fun calling - sequence must be y=fun(x,param_1,pararm_2,..,param_q). - If parameters param_1,param_2,..param_q exist then - numdiff can be called as follow - g=numdiff(list(fun,param_1,param_2,..param_q),x). + Without parameters, the function fun calling sequence is + y=fun(x), and numdiff can be called as + g=numdiff(fun,x). Else the function fun calling + sequence must be y = fun(x, param_1, pararm_2, ..., param_q). + If parameters param_1, param_2, ..., param_q exist then + numdiff can be called as follow + g=numdiff(list(fun, param_1, param_2, ..., param_q), x). See the @@ -87,7 +87,7 @@ g(i,j) = (df_i)/(dx_j) Examples myfun(x) +// myfun is a function from R^2 to R: (x(1),x(2)) |--> myfun(x) function f=myfun(x) f=x(1)*x(1)+x(1)*x(2) endfunction @@ -95,12 +95,13 @@ endfunction x=[5 8] g=numdiff(myfun,x) -// The exact gradient (i.e derivate belong x(1) :first component and derivate belong x(2): second component) is +// The exact gradient (i.e derivate belong x(1): first component +// and derivate belong x(2): second component) is exact=[2*x(1)+x(2) x(1)] //example 2 (with parameters) -// myfun is a function from R to R: x(1) |--> myfun(x) -// myfun contains 3 parameters, a, b, c +// myfun is a function from R to R: x(1) |--> myfun(x) +// myfun contains 3 parameters: a, b, c function f=myfun(x,a,b,c) f=(x+a)^c+b endfunction -- 1.7.9.5