Compute sensitivity indices by Sobol, Ishigami, Homma.
st = nisp_sobolsaTotal ( func , nx ) st = nisp_sobolsaTotal ( func , nx , randgen ) st = nisp_sobolsaTotal ( func , nx , randgen , n ) st = nisp_sobolsaTotal ( func , nx , randgen , n , inrange) [ st , nbevalf ] = nisp_sobolsaTotal ( ... )
a function or a list, the name of the function to be evaluated.
a 1-by-1 matrix of floating point integers, the number of inputs of the function.
a function or a list, the random number generator. (default = uniform random variables)
a 1-by-1 matrix of floating point integers (default n=10000), the number of Monte-Carlo experiments, for each sensitivity index
a 1-by-1 matrix of booleans (default inrange = %t), set to true to restrict the sensitivity indices into [0,1].
a nx-by-1 matrix of doubles, the total sensitivity indices
a nx-by-1 matrix of doubles, the actual number of function evaluations.
The algorithm uses the Sobol method to compute the total sensitivity indices.
This method assumes that all the input random variables are independent.
On output, the sensitivity indices are forced to be in the range [0,1].
Any optional input argument equal to the empty matrix will be set to its default value.
See the nisp_sobolFirst
function for the management of
func
and randgen
.
// Compute the total sensitivity indices of the ishigami function. // Three random variables uniform in [-pi,pi]. function y=ishigami(x) a=7. b=0.1 s1=sin(x(:,1)) s2=sin(x(:,2)) x34 = x(:,3).^4 y(:,1) = s1 + a.*s2.^2 + b.*x34.*s1 endfunction function x=myrandgen(m, i) x = distfun_unifrnd(-%pi,%pi,m,1) endfunction a=7.; b=0.1; exact = nisp_ishigamisa ( a , b ) n = 1000; nx = 3; [ st , nbevalf ] = nisp_sobolsaTotal ( ishigami , nx , myrandgen ) | ![]() | ![]() |