To accommodate the available spatial light modulators and to achieve t
he maximum possible storage capacity of a phase-code-multiplexed holog
raphic memory, it is often necessary to generate an orthogonal phase c
ode whose length is not a power of 2. We describe an algorithm for the
generation of basic Hadamard matrices of order M = 4p (with p an odd
number) and show that Hadamard matrices of order N = 4t (with t a posi
tive integer) can be constructed by combination of the algorithms pres
ented with the tenser-product extension method. (C) 1996 Optical Socie
ty of America