I hope this helped a little.
Veli-Pekka
"Michael Carey" <mpc...@bigpond.com> wrote in message
news:5Xwl9.42103$g9.1...@newsfeeds.bigpond.com...
> I want to convert from rectangular to polar on the 49G.
In the days of much older calculators, there were
no complex number objects or vector objects; people had to
enter two completely separate real numbers onto the stack and
mentally imagine that these were related, which is what gave rise
to the need to replace one pair of numbers with another pair
from time to time, which was called "converting" R<->P;
the calculator, meanwhile, never knew what was going on,
so the user had to take all responsibility for
invoking R<->P himself whenever required,
and then still dealing separately with each component
during other subsequent computations.
The modern HP48/49 has internal complex number objects
and vector objects; these single objects have only one
internal form, which is never "converted" at all;
instead, any "conversion" occurs automatically
during input parsing and output displaying,
so that the user need never explicitly convert anything himself.
On input, the user enters an "angle symbol" \<)
just preceding each coordinate which is an angle,
and the calculator immediately and automatically
converts that input into its internal form,
using the syntax to automatically understand
the type of coordinates which were entered:
[ x y ] or ( x y ) rectangular
[ r \<)theta ] or ( r \<)theta ) polar
[ x y z ] rectangular
[ r \<)theta z ] cylindrical
[ r \<)theta \<)phi ] spherical
For output (display), the user can choose RECT, CYLIN or SPHERE
display modes, and the calculator then immediately and automatically
converts every complex number or vector (2D and 3D) from its internal
form back to the coordinates that the user wants to see (above).
All angles, of course, are in the current angle display mode
(DEG, RAD, or GRAD), which is one more thing to be set
before entering input or interpreting output.
Whatever we now want to do with this calculator,
the above understandings should now make it clear how to do it.
If we want to enter some values in rectangular form and see
the same complex numbers or vectors displayed in polar form, we
just perform CYLIN or SPHERE once to set the output display style,
then start entering coordinates without any angle symbols;
each time we press ENTER, we instantly see our input "converted"
from rectangular input to polar output on the display,
without having to invoke any explicit "conversion" functions.
If we want to enter some values in polar form and see the same
objects displayed in rectangular form, we just perform RECT once;
as we enter each polar vector with an angle symbol and then
press ENTER, we instantly see it re-displayed in rectangular form,
again without having to invoke any explicit "conversion" functions.
Summary:
o Input:
Enter objects with an angle symbol preceding each angle value;
all conversion to internal form is automatic.
o Output:
Perform RECT/CYLIN/SPHERE to re-display output in desired forms;
all "conversion" from internal form to display is automatic.
o By entering in one format and displaying in another,
all "conversion" is automatic.
o Internal computations with complex numbers and vectors
are always automatically correct, because there exists
only one universal internal form for each object type;
there is no internal "conversion" between forms.
Other commands which operate on complex numbers:
o RE gives x, IM gives y, C\->R or OBJ\-> give both x and y
o ABS gives r, ARG gives theta [ABS also works with vectors]
> when I go to convert the vector (polar) back to its components
> it flips back to rectangular.
Nothing "flips back"; vector objects exist internally only in
rectangular component form, so commands such as OBJ\-> and ARRY\->
(or the Matrix Writer) will discover only rectangular components
"inside" a vector.
HOWEVER, there are three special commands (V\->, \->V2 and \->V3)
which actually convert between internal (rectangular) components
and external (display form) coordinates, depending on the current
coordinate display mode (RECT/CYLIN/SPHERE):
V\->
Disregards the internal components, and splits a complex number
or a 2- or 3-component vector into the separate values
that would be *displayed* in the current mode (RECT/CYLIN/SPHERE).
By the way, this is why V\-> is not a good idea as a shortcut
for ARRY\-> DROP, because sometimes it may produce converted,
angular coordinates, instead of the desired original components.
\->V2 and \->V3
These do the inverse of V\->
In other words, in CYLIN/SPHERE modes, these assemble
polar coordinates into a vector, just as if you had
typed angle symbols in front of those components,
thus "converting" external polar coordinates
into internal rectangular components.
You can have \->V2 produce either a vector or a complex number
object, according to whether flag -19 is clear or set.
Deja vu:
More rantings, old P<->R revived on HP48/49 for diehards,
RAD and POLAR toggles revived on HP49 for those who miss them,
angle symbol on a more convenient key, etc.
http://groups.google.com/groups?selm=3CA74D8B.55348AC5%40miu.edu
http://groups.google.com/groups?selm=3D46423F.6170959A%40miu.edu
http://groups.google.com/groups?selm=3B234542.CB2402A%40miu.edu
http://groups.google.com/groups?selm=3B230DDB.942573D%40miu.edu
With best wishes from http://www.mum.edu
.
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
"John H Meyers" <jhme...@miu.edu> wrote in message
news:3D9972A6...@miu.edu...
DUP RE SWAP IM
does the trick for you!
> The main problem is that when you do a obj-> command
> to a polar vector it will reduce back to the rectangular form.
Do V\-> instead of OBJ\->
There is no "polar vector" internally; there are only
different ways of entering the data to create the vector,
and different ways of displaying the vector on the stack,
but the internal components, revealed by OBJ\->
are always rectangular.
If you are displaying in CYLIN/SPHERE mode, showing angle(s),
then V\-> will result in the separate *displayable* values,
actually converting from the internal rectangular form,
which is what you are looking for in this case.
Likewise, \->V2 and \->V3 convert displayable separate inputs
back to internal rectangular form.
-[]-