-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOA.m
More file actions
33 lines (26 loc) · 653 Bytes
/
OA.m
File metadata and controls
33 lines (26 loc) · 653 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
%% Author: Matej Leps
% 12/2023, CTU in Prague, Czech Republic
%
% Orthogonal array for different levels
%
function TGB = OA(LEVELS)
% needs code for Least common multiple and regular Orthogonal array
addpath('lcms')
addpath('TaguchiArray')
if nargin<1
% Examples
% LEVELS = [2 4 3];
% 1.span 2.height 3.slope 4. snow 5.wind 6.life
LEVELS = [128 64 16 8 16 2];
end
vars = size(LEVELS,2);
% Just for size comparison uncomment following line
%DESIGN = fullfact(LEVELS);
maxlevel = lcms(LEVELS) ;
TG = TaguchiArray(maxlevel,vars) ;
for i=1:vars
TG (:,i)=mod(TG (:,i),LEVELS(i)) ;
end
TGB = unique(TG,'rows') ;
TGB = TGB+1 ;
end