Hi,Is direct matrix multiplication possible in Kdb+? I am trying in this- L*G but it throws an error. What are the mathematical operationspossible between Lists?Thanks,Sayan
X-Mailer: Apple Mail (2.930.3)On May 6, 2009, at 8:50 PM, Sayanosauras wrote:> Is direct matrix multiplication possible in Kdb+? I am trying in this> - L*G but it throws an error. What are the mathematical operations> possible between Lists?what exactly are you trying to do? mmu (or $) is matrix multiplication (floating point only), and * should work fine for the pairwise productq)(“f”$(1 2;3 4))mmu"f"$(5 6;7 8)19 2243 50q)(1 2;3 4)*(5 6;7 8)5 1221 32
Thanks. I was trying out this:q>T:(1 2 3;2 5 6)q>Tq> 1 2 3 2 5 6q>L:(1 2;4 5;7 8)q>Lq> 1 2 4 5 7 8So I want to multiply T and L (I was doing T*L / T*L)…What am Imissing?Thanks,SayanOn May 6, 5:56?pm, Aaron Davies <aaron.dav…> wrote:> On May 6, 2009, at 8:50 PM, Sayanosauras wrote:>> > Is direct matrix multiplication possible in Kdb+? I am trying in this> > - LG[] but it throws an error. What are the mathematical operations> > possible between Lists?>> what exactly are you trying to do? mmu (or $) is matrix multiplication ?> (floating point only), and * should work fine for the pairwise product>> q)(“f”$(1 2;3 4))mmu"f"$(5 6;7 8)> 19 22> 43 50> q)(1 2;3 4)(5 6;7 8)> 5 ?12> 21 32</aaron.dav…>
X-Mailer: Apple Mail (2.930.3)On May 6, 2009, at 9:07 PM, Sayanosauras wrote:> q>T:(1 2 3;2 5 6)> q>T> q> 1 2 3> 2 5 6> q>L:(1 2;4 5;7 8)> q>L> q> 1 2> 4 5> 7 8>> So I want to multiply T and L (I was doing T*L / T*L)…What am I> missing?that would be mmu (which requires float)q)T:“f”$(1 2 3;2 5 6)q)L:“f”$(1 2;4 5;7 8)q)T mmu L30 3664 77