MATLAB: Tensor product 2 matrices – kronecker product

kroneckermatricestensor

A question regarding the tensor product of 2 matrices, in combination with the Kronecker product.
I have 2 matrices: Qz and Qx.
Qx is Ns* Nx;
Qz is Ns * Nz.
Ns is the total states, consisting of all possible combinations of x and z (so Ns = Nx * Nz).
Lets say Ns = 14400; Nx = 3600; Nz = 4.
Then, I would like to multiply them using Tensor products, i.e. Q = Qz * Qx.
Is there any way to do this and to avoid to have a loop and apply the kron-function Ns times, to fill the matrix?

Best Answer

Q=reshape(Qz,Ns,1,[]).*Qx;
Q=Q(:,:);