Return the total number of function evaluations needed by a DOE with parameter_dim dimensions.
See also: run_parallel, doe_res_idx_to_param_idx.
The following code
parameter_dim = int32([3, 5]); x1 = linspace(0, 1, parameter_dim(1)); x2 = linspace(1, 2, parameter_dim(2)); n = doe_param_dim_to_res_dim(parameter_dim); func = @(x1, x2) x1^2 / (1 + x2^2); for i=1:n param_idx = doe_res_idx_to_param_idx(parameter_dim, i); x1_i = x1(param_idx(1)); x2_i = x2(param_idx(2)); printf("f_%02d(x1=%3.2f, x2=%3.2f)=%3.4f\n", i, x1_i, x2_i, func(x1_i, x2_i)); endfor
Produces the following output
f_01(x1=0.00, x2=1.00)=0.0000 f_02(x1=0.00, x2=1.25)=0.0000 f_03(x1=0.00, x2=1.50)=0.0000 f_04(x1=0.50, x2=1.75)=0.0615 f_05(x1=0.50, x2=2.00)=0.0500 f_06(x1=0.50, x2=1.00)=0.1250 f_07(x1=0.50, x2=1.25)=0.0976 f_08(x1=0.50, x2=1.50)=0.0769 f_09(x1=1.00, x2=1.75)=0.2462 f_10(x1=1.00, x2=2.00)=0.2000 f_11(x1=1.00, x2=1.00)=0.5000 f_12(x1=1.00, x2=1.25)=0.3902 f_13(x1=1.00, x2=1.50)=0.3077 f_14(x1=0.00, x2=1.75)=0.0000 f_15(x1=0.00, x2=2.00)=0.0000
Package: mboct-octave-pkg