Newsgroups: comp.lang.apl
Path: utzoo!utgpu!watserv1!watmath!ljdickey
From: ljdickey@watmath.waterloo.edu (L.J.Dickey)
Subject: Re: Do I really need a loop?
Message-ID: <1991May15.120900.15736@watmath.waterloo.edu>
Organization: University of Waterloo
References: <3970004@hpwrce.HP.COM> <15160018@hpdmd48.boi.hp.com>
Date: Wed, 15 May 1991 12:09:00 GMT
Lines: 24

In article <15160018@hpdmd48.boi.hp.com> rrr@hpdmd48.boi.hp.com (Rudi Rynders) writes:
...
>I would convert the vector V = 7 8 to a matrix the same size as M and
>fill it with a row of sevens and eigths as in VM assign 2 3 rho 7 7 7 8 8 8
>and then multiply M by VM to get the desired answer.

And, If you choose to use J, you could write
	
               M * |: (|. $ M) $ V

or in APL, you could do the same thing because

	       |: (|. $ M) $ V

is

		transpose ( reverse rho M) reshape V


-- 
Prof L.J. Dickey, Faculty of Mathematics, U of Waterloo, Canada N2L 3G1
internet:       ljdickey@watmath.UWaterloo.ca	BITNET/EARN:	ljdickey@watdcs
obsolescent?:	ljdickey@watmath.waterloo.edu
UUCP:		ljdickey@watmath.UUCP	..!uunet!watmath!ljdickey
