[comp.sys.handhelds] HP48 features -- what objects can be used?

silvert@cs.dal.ca (Bill Silvert) (02/11/91)

As a novice I may be missing something, but I would like to be able to
use some of the super features of the 48 for handling arrays, but they
all seem to deal with numbers.  I've worked around my problems by
writing programs, but it seems a shame to lose some of the 48's power.

For example, consider rotation by an angle stored in variable THETA.
I would love to be able to write equations like Y = A * X where X and Y
are 2D vectors and A is the array whose elements are cos(THETA), etc.
(Even better if I could solve for THETA!)

Also, it would be nice to construct an array from two vectors like this:

		[1,2]
		[3,4]
		2
		ARRY->

to get
		[[1,2] [3,4]]

but the objects have to be real numbers it seems (I haven't tried complex).

There are lots of similar things that would be nice to do, like
integrating vectors and so on.  Are any of these things possible?
I may have entered things wrong, but I can't even integrate a dot
product of two vectors, which is after all a scalar!
-- 
William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography
P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2.  Tel. (902)426-1577
UUCP=..!{uunet|watmath}!dalcs!biomel!bill
BITNET=bill%biomel%dalcs@dalac	InterNet=bill%biomel@cs.dal.ca

edp@jareth.enet.dec.com (Eric Postpischil (Always mount a scratch monkey.)) (02/11/91)

In article <1991Feb10.181833.16827@cs.dal.ca>, silvert@cs.dal.ca (Bill Silvert)
writes:

>For example, consider rotation by an angle stored in variable THETA.
>I would love to be able to write equations like Y = A * X where X and Y
>are 2D vectors and A is the array whose elements are cos(THETA), etc.
>(Even better if I could solve for THETA!)

I think somebody wrote some routines to do algebraic manipulation with matrices.
I don't know how extensive or good they are, but I think I have them around
somewhere.  If you send mail asking, I will mail them to you.

Note that the specific example you give can be handled without matrices. 
Two-dimensional vectors can be represented with complex numbers.  The equation
you give can be written as 'Y=X*EXP(\Gh*i)'.  ("\Gh" is the Greek theta
character, or you can use any variable name.)

>Also, it would be nice to construct an array from two vectors like this:
[combining rows]

You can write a program to do that, or you can use the \GS+ command.  ("\GS" is
the capital Greek sigma.)

>I may have entered things wrong, but I can't even integrate a dot
>product of two vectors, which is after all a scalar!

You should be able to do a numerical integration on an expression involving dot
products, but the variable of integration must be real (the range you specify
for it must be a range of real numbers) and the value of the expression must be
real.


				-- edp (Eric Postpischil)
				"Always mount a scratch monkey."
				edp@jareth.enet.dec.com