Newsgroups: comp.lang.apl
Path: watmath!ljdickey
From: ljdickey@watmath.waterloo.edu (L. J. Dickey)
Subject: Re: Simple J questions
Message-ID: <1991Sep11.035847.19449@watmath.waterloo.edu>
Organization: University of Waterloo
References: <1991Sep1.225152.22316@csus.edu> <1991Sep9.194216.28439@watmath.waterloo.edu> <ROCKWELL.91Sep9224252@socrates.umd.edu>
Date: Wed, 11 Sep 1991 03:58:47 GMT
Lines: 42



The other day, in response to an article by vpcsc4@sfsuvax1.sfsu.edu
(Emmett James McLean), I wrote about the arrays a and c:
	a	=. 1+i. 2 2
	c 	=. 1+i. 2 2 2
hui@yrloc.uucp (Roger Hui) has written to me and suggested
some improvements.

Question 2 of EJM's article askes how to multiply the 2nd
row by 2.  In my answer, I wrote that one could type:
   a * "(1) 1 2
This is wrong.  The expression
   a*"(_1) 1 2
gives the right answer.

In response to question 7, about how to multiply the top item
by two, I said that to multiply the top item of c by 2, one
could type
   c * "(1 0) 2 2 $ 2 1 1 1
This is correct.  However, the expression
   c*"(_1) 2 1
is simpler.

In response to question 8, about how to multiply the right
column by 2, I wrote that one could use:
   c * "1 (1 2)
This is correct.  However, the epression
may be replaced by a simpler one, namely
   c*1 2

Thanks to EJM for asking the questions in the first place, RR
(rockwell@socrates.umd.edu, Raul Rockwell) for suggesting simpler
expressions for a and c, and to RH for pointing out my error and
suggesting improvements.


-- 
Leroy J. (Lee) Dickey, Faculty of Mathematics, U of Waterloo, Canada  N2L 3G1
Internet:      ljdickey@watmath.UWaterloo.ca
UUCP:          ljdickey@watmath.UUCP             ...!uunet!watmath!ljdickey
Obsolescent?:  ljdickey@watmath.waterloo.edu     BITNET/EARN: ljdickey@watdcs
