[rho, pval] = corr(D(1:Nsize), params(1:Nsize,:), 'type', ...
                   'Spearman');
