MATLAB: I have make a code for block Kronecker product when both A and B have even dimension now thequestion (I want to make a code when A and B have are not even and also A is square and B is rectangular and vice versa)

block kronecker product

function y=Kronb4(A,B) %n is the order of the matrix R y=[kron(A,B(1:2,1:2)) kron(A,B(1:2,3:4)) ; kron(A,B(3:4,1:2)) kron(A,B(3:4,3:4))] ;

Best Answer

I'm not sure how to do this, but take a look at the implementation of kron in MATLAB:
edit kron.m
You'll see that it uses reshape and multiplication with implicit expansion to compute kron. Possibly, you can also get the block Kronecker product if you reshape the matrices in a different way?