<< intprb_getexpect Intprbs intprb_getname >>

Intprbs >> Intprbs > intprb_getfcn

intprb_getfcn

Returns the function value.

Calling Sequence

f=intprb_getfcn(m,n,x,nprob)

Parameters

m:

a 1-by-1 matrix of doubles, integer value, the number of experiments

n:

a 1-by-1 matrix of doubles, integer value, the dimension of the space

x:

a m-by-n matrix of doubles, the point where to compute f.

p:

a matrix of doubles, the parameters of the problem

nprob:

a 1-by-1 matrix of doubles, integer value, the problem number

f:

a m-by-1 matrix of doubles, the function value

Description

This function computes the function value at the point x.

Internally, 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.

Examples

// 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

Authors

Bibliography

"Integration Problems User's Manual", Michael Baudin, 2010


Report an issue
<< intprb_getexpect Intprbs intprb_getname >>