The following is a collection of codes for HP 48, 49, 50 (probably others) for manipulating vectors. They put a number of built -in capabilities at your finger tips and add a few that are very convenient (creating unit direction vectors, etc).
You can download them from the link below, or you can type them in. The download includes the files and a readme, with the files in HP text format. That format is the code, with additional information. I've stripped that information from the listings below so you can type them in as follows, but it's much easier to simply use the software HP gives you to download them to your calculator. Note that many of the codes are there only to get commands together in one directory. The "code" for those is simply a short cut to a built-in command that is a time-consuming to find.
Mac Users. Bummer there is no software from HP. However, you can use HPConnect. It works fine for me.
First, please consult your manual before contacting me. That's where I learned this.
Let's make a simple program first then you have the knowledge for the rest.
Hit the following in sequence.
| What you get | What you do to get it |
| «» | Orange key (right shift) + |
| SIN | SIN |
| ENTER | |
| M | ALPHA ALPHA M |
| y | White key (left shift) Y |
| S | S |
| i | White key i |
| n | White key n |
| ENTER | |
| STO> |
Now, if you put a number on the stack, and hit the MySin softkey (you may need to hit the VAR button first) at the top left of your keypad, you will get the Sine of that number. Kind of a silly code to write, but it illustrates the point.
For the Vector codes, there are a few characters that need to be left out. They are in the "hp text format". You type them in differently. For example, look at the MkVec.txt file. Type it in as:
<< DUP2 DEG COS * 3.000 ROLL 3.000 ROLL SIN * ->V2 >>
(spaces as evident in the downloadable file) compared to what the file says:
%%HP: T(3)A(D)F(.);
\<< DUP2 DEG COS * 3.000 ROLL 3.000 ROLL SIN * \->V2
\>>
So, the first line is gone and the "\" are all gone. The "\" actually tell the calculator that the next two characters are combined into one character using HP "Trigraphs" on the calculator but you don'thave to do this when typing them in since there is a keystroke sequence to generate them.
The characters << and >> are made with one key sequence, they are not two less than and two greater than signs. Hit Orange+ (press orange key, then press the plus key, you don't hold the orange key).
They are actually «», French angle quotes.
The -> is also a single character (right-arrow). Orange0 (zero) . I'm not sure if you can have a space between it and the V2 in the code above.
The following are the codes are you should see them before you save them.
MkVect
(Note: This version forces the calculator into degree mode. The downloadable version uses degrees but returns you to your original angle mode by using the HP Code header). I don't know how to type that in directly to the calculator.
<< DUP2 DEG COS * 3.000 ROLL 3.000 ROLL SIN * ->V2>>
M2V
<< ->COL 1 - DROPN>>
V2M
<< 1 ROW-> TRAN>>
AdRow
<< AUGMENT>>
Trnps
<< TRAN>>
Cross
<< CROSS>>
Dot
<< DOT>>
UDV
<< DUP ABS />>
V3
<< ->V3>>
V2
<< ->V2>>