I want to calculate the Kronecker product of several matrices in different orders. the
number of these matrices must be changeable.
sysdim = 5;(* number of matrices I want to multiply. this number must be changeable*)
id = IdentityMatrix[sysdim];
sp = (* it's a matrix. It can be anything. It's size is sysdim by sysdim*)
Do[Subscript[variable, i] = ReplacePart[KroneckerProduct[id, id, id, id, id], {i ->
sp}], {i, 1, sysdim}]
By this I can get all different Kronecker products corresponding to different orderings. However, I want to
change the number of these matrices as I wish. So, I thought the solution could be
something like this:
KroneckerProduct[Table[id,{i,1,sysdim}]]
The problem here is that the Tablecommand returns:
{id, id, id, id, id}
which KroneckerProductis not happy with. I need to get rid of the outermost braces to
get the KroneckerProductto work.
{i, {sysdim}}, Mathematica returns error but if I use{i,1,sysdim}or{sysdim}as Bob suggested everything is O.K. – MOON Jun 03 '14 at 17:44{i, 1, sysdim}to{sysdim}:) fixed now.. – kglr Jun 03 '14 at 17:48