Hi,
On Thu, Feb 02, 2012 at 10:06:25AM -0800, Martin Baker wrote:
> cartesianProduct : (M R, M R) -> M R
> ++ cartesianProduct(a,b) calculates the Kronecker sum
> ++ of the matrices {\em a} and b.
I never heard of a cartesian product of matrices,
only that the tensor product of operators is
called Kronecker product in the case of matrices,
together with a convention how to map M_m \otimes M_n
to M_{mn}.
I can suggest the following version using horizConcat and vertConcat:
tensorProduct(A:Matrix R, B:Matrix R):Matrix R ==
i,j: Integer
res1:List Matrix R := [ reduce(horizConcat$(Matrix R), _
[A(i,j)*B for j in 1..ncols(A)]) for i in 1..nrows(A)]
reduce(vertConcat,res1)
best,
Franz
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.