5 SUBROUTINE dfnrmk (NEQ, Y, T, YPRIME, SAVR, R, CJ, WT,
6 * sqrtn, rsqrtn, res, ires, psol, irin, ier,
7 * fnorm, eplin, wp, iwp, pwk, rpar, ipar)
40 IMPLICIT DOUBLE PRECISION (
a-
h,o-z)
42 dimension y(*), yprime(*), wt(*), savr(*), r(*), pwk(*)
49 CALL res(t, y, yprime, cj, savr, ires, rpar, ipar)
50 IF (ires .LT. 0)
RETURN
56 CALL dcopy(neq, savr, 1, r, 1)
57 CALL dscal(neq, rsqrtn, wt, 1)
59 CALL psol(neq, t, y, yprime, savr, pwk, cj, wt, wp, iwp,
60 * r, eplin, ier, rpar, ipar)
61 CALL dscal(neq, sqrtn, wt, 1)
62 IF (ier .NE. 0)
RETURN
66 fnorm =
ddwnrm(neq, r, wt, rpar, ipar)
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
subroutine dfnrmk(NEQ, Y, T, YPRIME, SAVR, R, CJ, WT, SQRTN, RSQRTN, RES, IRES, PSOL, IRIN, IER, FNORM, EPLIN, WP, IWP, PWK, RPAR, IPAR)
OCTAVE_EXPORT octave_value_list etc The functions then dimension(columns)
double precision function ddwnrm(NEQ, V, RWT, RPAR, IPAR)