Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!decwrl!pa.dec.com!rust.zso.dec.com!shlump.nac.dec.com!jareth.enet.dec.com!edp From: edp@jareth.enet.dec.com (Eric Postpischil (Always mount a scratch monkey.)) Newsgroups: comp.sys.handhelds Subject: Re: Feature the $100 TI can do, but not the $300 HP? Message-ID: <21684@shlump.nac.dec.com> Date: 3 Apr 91 13:09:35 GMT References: <1991Apr02.171733.4569@vpnet.chi.il.us> Sender: newsdaemon@shlump.nac.dec.com Reply-To: edp@jareth.enet.dec.com (Eric Postpischil (Always mount a scratch monkey.)) Organization: Digital Equipment Corporation 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