Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: nummath
See also: nmfder1d

Quantlet: nmfunc1d
Description: restricts func to a line: f(t) = func(x0 + t*direc)

Usage: ft = nmfunc1(t)
Input:
nmfunc1dfunc global variable, string, name of the function that has to be restricted to a line by this quantlet; as a result, the function should return a scalar
nmfunc1dx global variable, n x 1 vector, a point x0 on a line to which the function should be restricted
nmfunc1dd global variable, n x 1 vector, direction vector "direc" of a line to which the function should be restricted
t scalar, the only input parameter of a restricted function
Output:
ft scalar, ft = f(t) = func(x0 + t*direc)

Note:

Example:
library("nummath")
proc(a) = fun(x)
  a = x[1,]^2 + 3*(x[2,]-1)^4
endp
nmfunc1dfunc = "fun"
nmfunc1dx    = #(2,-1)
nmfunc1dd    = #(0,1)
putglobal("nmfunc1dfunc")
putglobal("nmfunc1dx")
putglobal("nmfunc1dd")
nmfunc1d(3)
; computes fun(#(2,2))

Result:
Contents of ft
[1,]        7



Author: L. Cizkova, 20010711 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006