Dear all
When using UQLab for a sensitivity analysis of a function of two parameters the computation crashes when plotting the second order Sobol index in subroutine uq_print_uq_sensitivity.m with the following error :
Index in position 1 exceeds array bounds. Index must not exceed 1.
Error in [uq_print_uq_sensitivity>print_sobol](matlab:matlab.lang.internal.introspective.errorDocCallback(‘uq_print_uq_sensitivity>print_sobol’, ‘/Users/lambert/Documents/MATLAB/UQLab_Rel2.0.0/modules/uq_analysis/builtin/uq_sensitivity/uq_print_uq_sensitivity.m’, 216)) ([line 216](matlab: opentoline(‘/Users/lambert/Documents/MATLAB/UQLab_Rel2.0.0/modules/uq_analysis/builtin/uq_sensitivity/uq_print_uq_sensitivity.m’,216,0)))
titles{ii} = [VN{ii,:}];
To my understanding it comes from the following test (line 214) : n = min(length(VN), 5);
As a matter of fact for two parameters there is only one value for second order Sobol index but in the test length(VN) will be equal to 2, so will be n and will then crash.
If I am correct using n = min(height(VN), 5); instead as a test should do the trick.
I hope I am not wrong, sincerely yours,