Metropoli BBS
VIEWER: arr_mul.tip MODE: TEXT (ASCII)
Date: Thu, 4 Apr 1991 09:23 CST
Subject: Re: Feature the $100 TI can do, but not the $300 HP?
Organization: Digital Equipment Corporation
Article-I.D.: shlump.21684
Lines: 29

In article <1991Apr02.171733.4569@vpnet.chi.il.us>, ron@vpnet.chi.il.us
(Ron Winograd) writes:

>The $90 or so TI (89, 80, 90, I can't remember the exact the one, the graphing
>one) can do matrix row operations, aka: Multiply row 1 by 5 and add to row 2.
>
>Can the hp48sx also do row operations?

There's nothing built in, but you could write such things.  Here's a
quick and dirty example:

\<< 2 \->LIST \-> m i \<< DUP IDN i m PUT SWAP * \>> \>>

Input is:
	array multiplier destination source

The program will multiply the source row by the multiplier and add it to
the destination row.  If the source and destination row are the same, it
only multiplies that row by the multiplier; it doesn't add the product
to the row.  This program is dirty because it uses array multiplication
to get the job done, rather than actually manipulating the elements, and
array multiplication does a whole lot more computations internally than
are really needed.  But it may be faster than user-language programs to
do the manipulation, even for good-sized arrays.


				-- edp (Eric Postpischil)
				"Always mount a scratch monkey."
				edp@jareth.enet.dec.com
[ RETURN TO DIRECTORY ]