|
A function of your own: |
Please type a piece of code for computing the function
in the following textarea, following FORTRAN rules.
No header must be given here, only the piece of code for computing fx
from x.
Important : the variable names are x(j), j=1,...,n, the output must be fx.
You also can set a logical err to .true. and return if the input x does not allow to
evaluate fx (for example x(1)=-1 and you need to evaluate log(x(1)).)
You can make use of the variable n,
the local variables x1,....,x4,
(not necessarily equal to x(1) etc) f1,f2,f3,f4,f5,f6,h,sum
and a vector z(1),...,z(100)
the integers i,j,k (for loops e.g.) and logicals bool1, bool2, bool3.
Also usable are the constants pi, sqrt2=sqrt(2) and e1=exp(1).
You are not allowed to declare new variables yourself. Line formatting is required here, hence
remember on the special role of column 1 to 6: blank. If not then : a C in column one for comments,
only a nonblank in column 6 = continuation line, a numeric value in column 1 to 5 and blank in column 6
defines a label you can jump to .
an identification text (appears in the plots) no inserted blank,comma
ident=
The number of variables
n =
Important: 2 <= n <= 100
and your initial guess
xstart(1),...,xstart(n)
|