Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!hplred!seroussi From: seroussi@hplred.HP.COM (Gadiel Seroussi) Newsgroups: comp.sys.handhelds Subject: Re: Re: HP48 Vectors to Array? Message-ID: <6230002@hplred.HP.COM> Date: 12 Mar 91 17:31:40 GMT References: <13845@life.ai.mit.edu> Organization: Hewlett Packard Labs, Palo Alto CA Lines: 29 I've been using the following "off the wall" programs for converting a set of vectors to a matrix and vice versa: V2MX: ---- Takes an integer n from level 1, and n vectors from levels 2..(n+1), and produces a n-row matrix (works for reals and complexes, and doesn't mess up your statistics): \<< \->LIST \->STR 1 "[" REPL DUP SIZE "]" REPL OBJ\-> \>> MX2V: ----- Does the inverse of V2MX: \<< DEPTH \-> d \<< \->STR DUP SIZE 1 - 2 SWAP SUB OBJ\-> DEPTH d - 1 + \>> \>> I'll leave it to others to optimize and squeeze the last nibble out of the above. Gadiel Seroussi HP Labs