The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

Vector Issues (49g+)
Message #1 Posted by Tim Wessman on 22 Nov 2004, 12:31 a.m.

I recently came across something that is driving me nuts.

I have two cattesian coordinates, lets say [10. 10.] [5. 5.]. Now i want to find the angle that [ 5. 5. ] is in relationship to [ 10. 10. ] . In other words, where it lies with respect to the "origin" point of 10,10. (225 deg)

Now my calculator gives me back 7.0... @ 45 deg. It is giving the relation from 0,0. How can i get it to give the angle FROM the other point?

examples of what i want:

[ 10 10 ] [11 10 ] -> [ 1 a0 ] [ 10 10 ] [5 5 ] -> [ 7.01... a225 ] [ -25 -25 ] [ -25 -20 ] -> [ 5 a90 ]

I've tried subtracting, every command in the VECT menu (I didn't know what they did, now I do=) and many other things.

So how would I go about doing this?

TW

12345

      
Re: Vector Issues (49g+) (edited)
Message #2 Posted by Vieira, Luiz C. (Brazil) on 22 Nov 2004, 1:07 a.m.,
in response to message #1 by Tim Wessman

Hi, Tim;

I read what you post and I guess I'm reasoning "too low", so I thought a "lower view" would get you into the right direction... I mean, if a kid shows you a way too far from what you want, at the moment you reason back to the actual problem you may see something you didn't see before. Kinda "reset". So, consider it as a "moskito" point of view.

You see, as an Engineer I sometimes confuse myself with the vector, complex and matrix entities representation for 2 and/or 3 dimension figures. This is someting I try to deal with, but I actually need to think two or three ways prior to get to a conclusion. After using the HP15C for a long time before having an HP28S and then get into the wonderland of the RPL objects, I got used to convert between polar to rectangular and use both as numbers, as I think most of us here do. Then I bought an HP48G and things became a little complicated at the begining.

In fact, after tasting the frustration of not having the angle and intensitiy of the vectors as numbers directly (instead simply representations) I figure that the need for numbers was only in my head. In fact, (5+i5) represents the same entity represented by (sqrt(50)<45). And that's how I deal with vectors, complex numbers and linear matrix with less than 4 elements: I no longer convert between representations, I simply read them. I actually don't need to convert when using the calculator (HP42S, HP28S, any HP48/49) because the calculator itself deals with them "as is". If I need any part of a 2D entity, I use RE (real part), IM (imaginary part), ARG (argument, or angle) or ABS (intensity).

So, have you tried:

(5 5) (10 10) -
instead of:
[5 5] [10 10] -
Then you can see the polar representation of the resulting complex number (you could use [MODE][Coord System][CHOOS] and select Polar or Spherical). You'll see (7.07106... <-135) (I don't know how to show it as (7.07106... <225), sorry...). As an alternate method of getting the argument:
(5 5) (10 10) - ARG
and you'll have the angle.

I am not aware of your specific needs, so I hope you forgive me posting a message that will probably not fit your needs, but I guess that someone else's point of view (even if it is a "moskito" point of view) might give you the chance to reason in another way and find your own solution.

Cheers.

Luiz (Brazil)

Edited: 22 Nov 2004, 1:20 a.m.

            
Re: Vector Issues (49g+) (edited)
Message #3 Posted by Francesc Casanellas on 1 Dec 2004, 2:42 a.m.,
in response to message #2 by Vieira, Luiz C. (Brazil)

You do not need to work with complex numbers to see them in polar notation.

When entering vectors if you enter integer numbers, the calculator keeps them as such. So you have to enter them as REAL, just adding a dot at the end, i.e.:

[10. 10.] [5. 5.] and then you will see the polar result if cylindrical mode in vector menu or polar in MODE, is selected.

                  
Re: Vector Issues (49g+) (edited)
Message #4 Posted by Vieira, Luiz C. (Brazil) on 1 Dec 2004, 6:35 a.m.,
in response to message #3 by Francesc Casanellas

Hi, Francesc;

thank you for your additional info (at least for me). I was not aware of this real and integer different behavior when entering vectors. After reading your post I relized that I've been taking as a curiosity the fact that the HP49 always adds a dot to a real number when STD mode is set, and the HP48 doesn't. Now I see taht this "dot" must be taken into account!

Thanks!

Luiz (Brazil)

                        
Real numbers and exact integers (49 series)
Message #5 Posted by James M. Prange on 1 Dec 2004, 10:05 a.m.,
in response to message #4 by Vieira, Luiz C. (Brazil)

Well, make that "Exact" and "Approximate" modes for how the calculator treats integer valued numbers without decimal points. STD mode affects how reals are displayed.

This applies to the 49 series only.

An "exact integer" (also known as a "zint") can often be used where you'd normally use a "real" number because many commands start out by converting it to a real, but actually they're distinct object types, type 0 for reals, and type 28 for zints. In other cases, if any reals are involved in the operation, then all zints involved are converted to reals. In exact mode, if no reals are involved, then the result of an operation with zints is either a single zint or an algebraic (symbolic) object. With the calculator in exact mode, 1. 2 / returns .5, but 1 2 / returns '1/2'. Perhaps more to the point, 1. 3 / returns .333333333333 (an approximate result), but 1 3 / returns '1/3' (an exact result).

As you've noticed, zints and reals can't always be used interchangeably. Note that in IOPAR and PRTPAR, zints can't be substituted for reals.

In the case of arrays, if the elements aren't either all real numbers or all complex numbers, then it's a symbolic array (type 29). Symbolic arrays can include names, algebraic objects, and zints as elements, as well as real and complex numbers.

Note that a zint can have as many digits as can fit into the available memory.

To force a zint to a real, use the \->NUM command (over RightShift [ENTER]). To change all zints in a composite (program, list, or algebraic) to reals, with the 49 in approxomate mode, EDIT the object, and then press ENTER to recompile it. To toggle between exact and approximate mode, press [ENTER] while holding down RightShift. In the status area, note the = for exact or ~ for approximate.

Regards,
James

Edited: 1 Dec 2004, 10:18 a.m.

                              
Re: Real numbers and exact integers (49 series)
Message #6 Posted by James M. Prange on 1 Dec 2004, 11:54 a.m.,
in response to message #5 by James M. Prange

PS:

There's also an I\->R command, which changes a zint to a real and leaves a real as is, and an R\->I command, which changes a real to a zint and leaves a zint as is. These can also be used on a list, provided that all elements are either reals or zints.

Regards,
James

Edited: 1 Dec 2004, 11:56 a.m.

                                    
Re: Real numbers and exact integers (49 series)
Message #7 Posted by bill platt on 1 Dec 2004, 12:24 p.m.,
in response to message #6 by James M. Prange

Hi James,

I once had both Erable and ALG48 on my 48gx, for a short time (and then "invalid card data" ended it). I seem to remember that there was support for this business there. In fact, how similar is the 49G (not the G+ necessarily) to either/or Erable/Alg48? Didn't the Authors of those applications work directly for HP in the 49 development, just as JYA did in migrating MetaKernel over to the 49?

I guess what I am interested in, is whether this interesting discussion applies also to our "vintage" models--provided that one has the cards. If so, it is useful to know this.

Regards,

Bill

regards,

Bill

                                          
Re: Real numbers and exact integers (49 series)
Message #8 Posted by James M. Prange on 1 Dec 2004, 10:18 p.m.,
in response to message #7 by bill platt

I'm not very familiar with either ALG48 or Erable (it's been a long time since I've had them on my 48), but the 49 series' CAS (Computer Algebra System) is supposed to be a superset of Erable. I don't think that Bernard Parisse (Erable's author) was an HP employee, but rather that the CAS development for the 49G was outsourced to him. I understand that the functionality of ALG48 is pretty much incorporated into the 49G, but I don't know what connection its authors (Claude-Nicolas Fiechter and Mika Heiskanen) might have with HP. Of course, the 49g+ pretty much uses the 49G ROM with few changes running on emulated 49G hardware.

For a lot more information on these matters, try some searches of the comp.sys.hp48 newsgroup archive, and if that doesn't tell you enough, then post a question to the newsgroup.

Regards,
James

      
Re: Vector Issues (49g+)
Message #9 Posted by Scott Guth on 22 Nov 2004, 1:08 a.m.,
in response to message #1 by Tim Wessman

Hello,

From the first point, [x,y], subtract the "origin", [h,k], then convert to polar.

Bye, Scott Guth

            
Re: Vector Issues (49g+)
Message #10 Posted by Tim Wessman on 22 Nov 2004, 1:45 p.m.,
in response to message #9 by Scott Guth

Yes. I got it working now. For soem reason I kept having trouble with it last night. Could be that it was way past my bedtime. . . ;-)

Thanks for the help.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall