Post Reply 
Kronecker Product?
02-17-2019, 08:06 PM
Post: #5
RE: Kronecker Product?
(02-17-2019 07:52 PM)Didier Lachieze Wrote:  Here is a CAS program to calculate the Kronecker product of two matrices:

Code:
#cas
kronecker(a,b):=
BEGIN
 local m,n,p,q;
 m:=rowDim(a); n:=colDim(a);
 p:=rowDim(b); q:=colDim(b);
 makemat((j,k)→a(iquo(j-1,p)+1,iquo(k-1,q)+1)*b(((j-1) MOD p)+1,((k-1) MOD q)+1),m*p,n*q);
END;
#end

Thank you, kind sir! Excellent, as always. I was a bit surprised not to find this in the suite of similar commands, but I'll add this into my collection!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Kronecker Product? - DrD - 02-17-2019, 02:39 PM
RE: Kronecker Product? - informach - 02-17-2019, 03:47 PM
RE: Kronecker Product? - DrD - 02-17-2019, 05:48 PM
RE: Kronecker Product? - Didier Lachieze - 02-17-2019, 07:52 PM
RE: Kronecker Product? - DrD - 02-17-2019 08:06 PM
RE: Kronecker Product? - Didier Lachieze - 02-18-2019, 08:58 AM
RE: Kronecker Product? - DrD - 02-18-2019, 10:26 AM



User(s) browsing this thread: 1 Guest(s)