Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!agate!ucbvax!hplabs!hpl-opus!hpcc05!hpwrce!kingsley From: kingsley@hpwrce.HP.COM (Kingsley Morse) Newsgroups: comp.lang.apl Subject: Re: Do I really need a loop? Message-ID: <3970005@hpwrce.HP.COM> Date: 15 May 91 01:04:28 GMT References: <3970004@hpwrce.HP.COM> Organization: HP Western Response Center Lines: 21 Thank you for replying, Rudi. Here's another solution that works with STSC's APLII for the 386. ^^M,.xV This is the inner product. (I'm writing this from memory; I may have reversed M and V. Now that I think about it, the inner dimensions of M and V are supposed to be the same.) Anyway, first each column of M is multiplied by the corresponding element in V, then each row of that result is catenated with the ",". Because the inner product syntax requires two functions, one before and one after the ".", I used the "," to avoid changing the results of the multiplication, but for some reason, the result of M,.xV is a doubly nested array. The "^" character in the first example is supposed to be an up arrow which means "un-nest this" in STSC's APLII for the 386. I had to un-nest the result twice.