# How to make Latin look up table

1 view (last 30 days)
sadiqa ilyas on 1 Jan 2020
Commented: Image Analyst on 2 Jan 2020
I want to use a look up table for example if L1 is latin table and B is another table
I want b1=(k*B(1,1))*B(1,2))*(B(1,3)).
b2=(b1*B(2,1))*B(2,2))*B(2,3))
b3=(b2*B(3,1)*B(3,2))*B(3,3))
L1=latsq(5);
L1 =
1 2 3 4 5
2 3 4 5 1
3 4 5 1 2
4 5 1 2 3
5 1 2 3 4
k=2;
B =
2 3 4
1 2 3
1 2 3
b1=(k,2),3),4)=(2,2),3),4)%now use L1i.e (2,2)=3, (3,3)=5
b1=(3,3),4)=(5,4)=3
How to perform this in matlab

Image Analyst on 1 Jan 2020
Edited: Image Analyst on 1 Jan 2020
I'm not sure if there is a Latin Square generating function in MATLAB though there are some design of experiments functions in the stats toolbox.
In the past I've coded up (in Visual Basic) a Latin Square generating function, using the algorithm in Wikipedia, but I don't have MATLAB code for it.

sadiqa ilyas on 2 Jan 2020
latin square is generated ,I want to use it as look up table.
Image Analyst on 2 Jan 2020
b1=(k,2),3),4)=(2,2),3),4)%now use L1i.e (2,2)=3, (3,3)=5
b1=(3,3),4)=(5,4)=3
That is meaningless to me. I have no idea how to create b1 from L1, k, and B. Please explain how L1 is to be used as a look up table for either the values or index locations of B.