Roger Hui wrote: > > In my opinion ,/"2,/ a */"1"1 2 b is far from straightforward; > a*&.>< b and then "removing the boxes" is more straightforward. >
Another way to look at it is to note that a*/b already does the product up to the gluing together block matrices of the result (which is also what (a *&$ b) ($,) 0 2 1 3 |: a */ b does), so the product can be written also as: ,./^:2 a*/b > http://www.jsoftware.com/jwiki/Essays/Kronecker_Product > Example from the essay: ] A=: 10+i.2 3 10 11 12 13 14 15 ] B=: i.3 4 0 1 2 3 4 5 6 7 8 9 10 11 A *&.> < B +---------------+---------------+---------------+ | 0 10 20 30 | 0 11 22 33 | 0 12 24 36 | |40 50 60 70 |44 55 66 77 |48 60 72 84 | |80 90 100 110 |88 99 110 121 |96 108 120 132 | +---------------+---------------+---------------+ | 0 13 26 39| 0 14 28 42| 0 15 30 45| | 52 65 78 91| 56 70 84 98| 60 75 90 105| |104 117 130 143|112 126 140 154|120 135 150 165| +---------------+---------------+---------------+ ,./^:2 A */ B 0 10 20 30 0 11 22 33 0 12 24 36 40 50 60 70 44 55 66 77 48 60 72 84 80 90 100 110 88 99 110 121 96 108 120 132 0 13 26 39 0 14 28 42 0 15 30 45 52 65 78 91 56 70 84 98 60 75 90 105 104 117 130 143 112 126 140 154 120 135 150 165 ----- Original Message ----- From: Zsbán Ambrus <[email protected]> Date: Friday, February 26, 2010 4:00 Subject: Re: [Jprogramming] Kronecker Product To: Programming forum <[email protected]> > On Fri, Feb 26, 2010 at 12:28 AM, Roger Hui <[email protected]> > wrote:> (a *&$ b) ($,) 0 2 1 3 |: a */ b > > That might be more efficient, but I think the most > straightforward way > to compute this is just this: > > ,/"2,/ a */"1"1 2 b > > Ambrus ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm -- View this message in context: http://old.nabble.com/Re%3A-Kronecker-Product-tp27717356s24193p27720254.html Sent from the J Programming mailing list archive at Nabble.com. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
