Name

intprb_getfcn — Returns the function value.

Calling Sequence

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

Parameters

m:

a floating point integer, the number of experiments

n:

a floating point integer, the dimension of the space

x:

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

p:

a matrix of doubles, the parameters of the problem

nprob:

the problem number

f:

a mx1 matrix of doubles, the function value

Description

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

Michael Baudin - 2010 - DIGITEO

Bibliography

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