Re: [Jprogramming] Simple scalar multiplication of matrices

2016-04-18 Thread 'Pascal Jasmin' via Programming
ist. (though creates a 2d result) - Original Message - From: 'Jon Hough' via Programming To: programm...@jsoftware.com Sent: Monday, April 18, 2016 7:54 PM Subject: Re: [Jprogramming] Simple scalar multiplication of matrices Thanks for the responses. It seems ravelling the lef

Re: [Jprogramming] Simple scalar multiplication of matrices

2016-04-18 Thread 'Jon Hough' via Programming
Thanks for the responses. It seems ravelling the left argument is the easiest way to go. On Tue, 4/19/16, 'Pascal Jasmin' via Programming wrote: Subject: Re: [Jprogramming] Simple scalar multiplication of matrices To: "programm..

Re: [Jprogramming] Simple scalar multiplication of matrices

2016-04-18 Thread 'Pascal Jasmin' via Programming
there is also the adverb (no source transforms) (i. 1 4) *"1 1"1 2 i. 2 4 0 1 4 9 0 5 12 21 (or shorthand) "1"1 2 - Original Message - From: EelVex To: Programming forum Sent: Monday, April 18, 2016 4:49 AM Subject: Re: [Jprogramming] Simple scalar multip

Re: [Jprogramming] Simple scalar multiplication of matrices

2016-04-18 Thread R.E. Boss
] > On Behalf Of 'Jon Hough' via Programming > Sent: maandag 18 april 2016 10:42 > To: Programming Forum > Subject: [Jprogramming] Simple scalar multiplication of matrices > > I am sure there is a simple answer to this, but I would like to know it. > > Say I have two

Re: [Jprogramming] Simple scalar multiplication of matrices

2016-04-18 Thread Raul Miller
was actually just trying that. Problem is, it has a dangling dimension > (shape 1 4 2), which can be removed, but seems a little messy. > > > > On Mon, 4/18/16, EelVex wrote: > > Subject: Re: [Jprogramming] Simple scalar mu

Re: [Jprogramming] Simple scalar multiplication of matrices

2016-04-18 Thread Kip Murray
removed, but seems a little messy. > > > > On Mon, 4/18/16, EelVex > wrote: > > Subject: Re: [Jprogramming] Simple scalar multiplication of matrices > To: "Programming forum" > > Date: Monday, April 18, 2016, 5:54

Re: [Jprogramming] Simple scalar multiplication of matrices

2016-04-18 Thread 'Jon Hough' via Programming
Thanks, I was actually just trying that. Problem is, it has a dangling dimension (shape 1 4 2), which can be removed, but seems a little messy. On Mon, 4/18/16, EelVex wrote: Subject: Re: [Jprogramming] Simple scalar multiplication of matrices

Re: [Jprogramming] Simple scalar multiplication of matrices

2016-04-18 Thread EelVex
Of course, you can still go by the dot product. Just don't sum: a (] . *) |:b 10 14 22 30 36 48 52 68 On Mon, Apr 18, 2016 at 11:49 AM, EelVex wrote: > If you remove the first axis of a you can multiply-1: > > (,a) *"1 b > 10 22 36 52 > 14 30 48 68 > > Do you really need a to be 1xn ? > >

Re: [Jprogramming] Simple scalar multiplication of matrices

2016-04-18 Thread Mike Day
Similar here, but I was going to add that you can embed the ravel in the verb: (,a)*" 1 b NB. same as EelVex 10 22 36 52 14 30 48 68 a (*"1, )~ b NB. hooking the ravel: 10 22 36 52 14 30 48 68 or b (*"1, ) a NB. if you're ok with b f a 10 22 36 52 14 30 48 68 Mike On

Re: [Jprogramming] Simple scalar multiplication of matrices

2016-04-18 Thread EelVex
If you remove the first axis of a you can multiply-1: (,a) *"1 b 10 22 36 52 14 30 48 68 Do you really need a to be 1xn ? On Mon, Apr 18, 2016 at 11:41 AM, 'Jon Hough' via Programming < programm...@jsoftware.com> wrote: > I am sure there is a simple answer to this, but I would like to know it

[Jprogramming] Simple scalar multiplication of matrices

2016-04-18 Thread 'Jon Hough' via Programming
I am sure there is a simple answer to this, but I would like to know it. Say I have two matrices: a =: 1 4 $ 1 2 3 4 b =: 2 4 $ 10 11 12 13 14 15 16 17 and I want to multiply a's single row element-wise with each of b's rows. Not matrix multiplication, so the resulting matrix should have dimens