intprb_getfcn — Returns the function value.
f=intprb_getfcn(m,n,x,nprob)
a floating point integer, the number of experiments
a floating point integer, the dimension of the space
a m x n matrix of doubles, the point where to compute f.
a matrix of doubles, the parameters of the problem
the problem number
a mx1 matrix of doubles, the function value
It is an interface function which calls the function getfunc (which selects appropriate test fuction based on nprob).
See the "Integration Problems User's Manual" available in the doc directory of this toolbox for a detailed description of this function.
// Get function value at [1 1 1] for Sum test case nprob = 1 [n,p] = intprb_getsetup(nprob) x = ones(1,n) m = 1 f = intprb_getfcn(m,n,x,p,nprob) // Get function value for randomized experiments for Sum test case nprob = 1 [n,p] = intprb_getsetup(nprob) m = 10 x = grand(m,n,"def") f = intprb_getfcn(m,n,x,p,nprob) // Print summary statistics [min(f) max(f) mean(f) st_deviation(f)] // Perform a Monte-Carlo on Sum nprob = 1; [n,p] = intprb_getsetup(nprob) e = intprb_getexpect(n,p,nprob) v = intprb_getvariance(n,p,nprob) for m = logspace(3,5,3) x = grand(m,n,"def"); f = intprb_getfcn(m,n,x,p,nprob); meanm = mean(f); varm = variance(f); mprintf("%10d %+7.5f %.7f %.7f\n",m,meanm,varm,varm/m); end