Yeah. #Code Param_A_Set = 1:1:10; Param_B_Set = 100:5:500; Param_C_Set = 0.1:0.1:0.9; Param_D_Set = 0.1:0.1:0.9; [A, B, C, D] = ndgrid(Param_A_Set, Param_B_Set, Param_C_Set, Param_D_Set); ParamsPairs_Set = [A(:) B(:) C(:) D(:)]; clear A B C D; ParamsPairs_Size = size(ParamsPairs_Set, 1); ParamsPairs_Result = zeros(ParamsPairs_Set, 1); ParamsPairs_Cur_Index = 0; ParamsPairs_Cur_Set = 0; // Find R..