Hello!
How do I convert polar coordinates to rectangular with my hp 49g+?
Please help me!
p>r


« Next Oldest  Next Newest »

▼
01122007, 11:50 AM
▼
01122007, 01:16 PM
Hi; the HP49G+ (along with the HP48 series and HP50) allows many coordinate/complex number representations, so you can choose one or another and the number itself is kept the same as you enter. Given that you have either the rectangular (5.00,5.00)or polar (7.07 <45.00)in stack level 1, you can use:
ARG to get 45.00 (argument, angle); RPN/Algebraicbased models actually convert from one representation to another, but the RPL models keep consistent representation, while the rectangular form is internally stored. You can find other information here and probably here. Although these links point to HP50G documents, its operation with complex/2D vectors is mostly the same as in the HP49G+. Hope this helps. Cheers. Luiz (Brazil)
Edited: 12 Jan 2007, 1:27 p.m.
01122007, 03:04 PM
I have a 50G, but it should be similar to a 49G+. First, go to MODE and check the following settings:
 Set "Angle Measure" to degrees or radians. Let's use degrees. You should see DEG XYZ in the upper left corner of the display, which indicates degrees and rectangular coordinates. Now enter your point, in polar notation, onto the stack. Suppose the point is (7.07, 45 degrees). You enter:
[leftshift] ( ) The ALPHA[rightshift]6 combination generates the angle symbol, which tells the calculator that these are polar coordinates. Now hit ENTER. The calculator will recognize that these are polar coordinates, and will automatically convert them to rectangular format (because you specified this format in MODE). You will see (5.00,5.00) on level 1 of the stack.
If you want to convert back to polar coordinates, go to MODE and change the "Coord System" setting to Polar. The point will automatically change back to (7.07, angle 45.00) Edited: 12 Jan 2007, 3:08 p.m. ▼
01122007, 07:05 PM
Not nearly as simple, quick and elegant as the P>R key on the old RPN models, is it? I'd bet a wooden nickle a person could bang out the rectangular coordinates manually faster than having to do it that way. Or, just write a short program that takes the numbers in the bottom two stack levels as the polar argument and converts them: (M sin(theta) for the imaginary, and M cos(theta) for the real coordinate. Granted this wouldn't integrate with the vast complex number functionality built into the calculator, but it will let you easily throw in some polar coordinates in (as pure numbers!) and view the rectangular outcome...just like in the good ole' days! ▼
01132007, 01:54 AM
Hi, Hal!
Quote: Hmm, that is old! I don't own any 1970's LED models between the HP35 and HP34C; neither those nor any subsequent RPNbased model had a polartorectangular "P>R" function denoted as such. However, the HP65 and HP67/97 did have "P>R" and "R>P". The HP42S had ">REC"; the HP32S/SII had "theta,r>y,x". Most earlier models had ">R"; on the HP15C this worked on two real values or on one complex value. The HP28C/S also had "P>R" and "R>P", which worked only on complex values. Its main shortcoming was that it could not compute in polarcoordinate complex values or display one as such (with angle symbol). Here's an annoying flaw of the HP42S: Convert a complexvalued number from one format to the other using ">POL" or ">REC". The components will be converted correctly, but the representation will be unchanged. Example:
5.00 i12.00 >POL yields Personally, I dislike the parenthesized orderedpair representation of complex numbers on the RPLbased models. It could be many things in the notation of mathematics:
The complexvalue representation of the HP42S is ideal, I'd say. None of the HP calc's got complex numbers completely right, though. I had some suggestions a while ago:  KS
Edited: 13 Jan 2007, 6:25 p.m. after one or more responses were posted ▼
01132007, 12:51 PM
My favorite R>P, P>R function implementation on the old HP calculators is on the HP46. When you have the printer turned on it prints both the X and Y registers after performing the conversion. It's sort of startling at first since this is the only function that works that way and you expect to see/hear the printer just output one number not two. Because R>P and P>R are nonstandard "functions", it's quite interesting to see how different calculator manufactures decided to implement this. The RPN stack makes it seem like there's an obvious way to do this, but there is no obvious way on nonRPN calculators, for example:
The Compucorp 320/322/324 works like this: This last example makes the EL5001 look bad, actually it's the only one of the bunch that appears to have some serious thought behind dealing with multifactor "functions". It implements several of them using it's barrel function selector knob and dedicated function keys. But most scientific calculators from the preLCD era don't even try to implement the R>P, P>R functions. Katie
▼
01132007, 06:12 PM
Hi, Katie 
Quote: By strict mathematical definition, R>P and P>R each are two functions in one command:
r = sqrt(x^{2} + y^{2}) It is indeed astounding how complicated and obfuscated these two commands are, on modern algebraic EOS calculators. On some of them in my collection, I couldn't even deduce how the commands worked. (This is unimportant, because I don't use them in practice, and didn't pay very much for them...) The HP30S seems to have borrowed from TI82. There are commands called R>Pr(), R>Ptheta(), P>Rx(), and P>Ry() under menus, in which the user must first select the command, then input both coordinate values inside the parentheses, in order to receive only one of the converted values. The older AOS models, such as the HP20S and Casio fx3600P (from 1981) are more straightforward, because they have a SWAP (x<>y)function to see both results. It is easy to convert back and forth on the HP20S without reentering or rearranging data, unlike with practically every other nonRPN calculator. Then, of course, there is the early HP33S, which gave wrong answers(!), as discussed previously: http://www.hpmuseum.org/cgisys/cgiwrap/hpmuseum/archv014.cgi?read=61086#61086
 KS Edited: 13 Jan 2007, 6:13 p.m.
01132007, 10:18 PM
Okay, for something like the 28 series commands, in UserRPL source %%HP: T(3); @ ASCII transfer header. %%HP: T(3); @ ASCII transfer header. %%HP: T(3); @ ASCII transfer header. %%HP: T(3); @ ASCII transfer header. %%HP: T(3); @ ASCII transfer header. %%HP: T(3); @ ASCII transfer header. %%HP: T(3); @ ASCII transfer header. %%HP: T(3); @ ASCII transfer header.Regards James
01132007, 06:06 AM
I just know 48 series can use"vector" to do it
5 (distance)
VECTR (3 , 4)
01132007, 04:55 PM
The other responders have explained the use of the display and entry modes of the 49g+. That may well have been what you were after, but just in case what you really want to do is mimic the way classic calculators did polar to rectangular and rectangular to polar conversion, I’ll offer the following. Polar to Rectangular:
I stored the first in a variable named ‘P>R’ and the second in a variable named ‘R>P’, put them in a custom menu, and have keyboard accessible functions just like my good ‘ol HP45.
Edited: 13 Jan 2007, 5:49 p.m. after one or more responses were posted ▼
01132007, 05:31 PM
Hi, Jeff 
Quote: I tried your "R>P" on HP48G, and it locked up. I guess the original 48's and the later models don't have the same addresses. How about the HP49G? The program didn't seem to work correctly, although it did run...  KS ▼
01132007, 05:44 PM
Karl, ▼
01132007, 09:08 PM
Actually, I rather prefer the way the 48/49 series handles this.
You could also change the display modes using the system flags: Flag 15 Set: Spherical (if flag 16 set)To decompose to separate real numbers in rectangular coordinates, you can use the OBJ\> command, or to decompose to real numbers in the current angular and coordinate display mode, use the V\> command. To combine 2 (or 3) reals into a vector, use the \>V2 (or \>V3) command.
If flag 19 is set, then \>V2 makes a complex number, and if flag
You can also use the ARRY\> and \>ARRY commands to convert
The RE command give you the real part of a complex number, and the
ABS gives you the "length" of a complex or array, that is, the
If you want the compiler to recognize that a real represents an
Also note that editing (or transferring) a vector when in
But here are the relevant entry points for the 49 series: 30E79 %REC>%POL ( %x %y > %r %ang )Or for the 48 series: 2B48E %REC>%POL ( %x %y > %r %ang )In SysRPL, "%" signs generally mean "real" numbers, and of course the entry points are in hex notation, so for an R>P command, 2 real numbers are required for arguments, and the SYSEVAL sequence for the 49 series would be: #30E79h SYSEVALFor the 49 series, the calculators have an MASD SysRPL/Assembly compiler/decompiler builtin. Ordinarily, this is used with an extable library so that named mnemonics can be used, but even without extable, you can still use numeric entry points.
Source code for some 49 series SysRPL programs, with argument %%HP: ; @ ASCII transfer header %%HP: ; @ ASCII transfer header %%HP: ; @ ASCII transfer header %%HP: ; @ ASCII transfer header %%HP: ; @ ASCII transfer header %%HP: ; @ ASCII transfer header
You can copy and paste the source code (beginning with the
To compile the above source code with extable installed, put the
To do it without extable, you'll have to use one of the strings
The !NO CODE and !RPL lines are compiler directives. If you set
If you set flag 85 (SysRPL stk disp), then the programs (and
Note that MASD requires the "@" to be the only character in the
I'd encourage anyone interested to see
For the 48 series, you'd have to use a different compiler. Maybe try a
A useful crossreference of 48 and 49 series entry points can be
The official HP extable library for the 49 series can be found at
Regards,
Edited: 14 Jan 2007, 12:16 a.m. 