The following Listings are describing several utilities for coding/decoding. Indeed, it is useful to leave coexist:
LISTING 5 describes txt2itm and itm2txt, i.e. transcoding between the human readable description and the split Euclidean code. From all the transcoding routines, txt2itm is the only one that checks if its input is correct, in order to detect human typing errors (computers never fail, aren't they ?).
LISTING 6 describes itm2num
and num2itm, i.e. transcoding between the two Euclidean codes.
By the way, one can see why it is essential to start these codes from
0 and not from
.
LISTING 7 shows how to
convert several lines of split Euclidean code into matrix code and
conversely (itm2cod and cod2itm). Now, a command
like :
ma=itm2cod(txt2itm(datas(2:$,:)))
can be used to combine these routines and produce the computable matrix
ma from the human readable description datas of the design.
It should be noted that the number of lines of matrix ma
is exactly the number of tests of the design, while matrix datas
contains also a title line, and a column of results.
Finally, LISTING 8 provides a way to map a design of experiments in order to examine how the different factors are dispatched. Being tailored to compare different designs, this algorithm must receive the given design as parameter.