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 Random ParamsPairs Set
[index] = find(ParamsPairs_Result == 0);
if (~isempty(index))
temp = randi([1 length(index)]);
ParamsPairs_Cur_Index = index(temp);
ParamsPairs_Cur_Set = ParamsPairs_Set(ParamsPairs_Cur_Index);
else
disp('Task Completed..')
end
'Memo > Matlab' 카테고리의 다른 글
Matlab function : Change the Enable of several UIs (0) | 2022.08.09 |
---|---|
Matlab : Make & Write Data in PPT file (without PPT API) (0) | 2022.08.09 |
Matlab function : Save and load UI values in text (0) | 2022.08.08 |
Matlab function : Update the Text Area with part of a text file (0) | 2022.08.02 |
Matlab : UI drop-down (0) | 2022.08.01 |