The Museum of HP Calculators

HP Forum Archive 16

[ Return to Index | Top of Index ]

Building matrices using "Solve lin sys.." on the 50g.
Message #1 Posted by Ken Ratkevich on 11 Dec 2006, 9:06 a.m.

Greetings,

If someone has the time I could sure use some help.

To make a long story short, I have been unable to build the A and B matrices for "Solve lin sys.." where the elements are complex numbers. I get various error messages depending on the way I try to do it. However, I can use MTRW to populate matrices with complex elements in both rectangular and polar representations.

I would much rather solve the system directly in "Solve lin sys.." than use Cramer's rule.

If someone is so inlined to try this, here are the exact matix elements I am working with:

For matrix A:
- A11=3+i*3+7.07+i*7.07
- A12=7.07+i*7.07
- A21=7.07+i*7.07
- A22=7.07+i*7.07

For matrix B (using polar representation):
- B11=(10,<0)
- B21=(5,<45)

Any and all assistance would be greatly appreciated,
Ken

BTW - Not that it matters but the elements in A are impedances, the elements in B are voltages and the unknowns are currents.

Edited: 11 Dec 2006, 9:18 a.m.

      
Re: Building matrices using "Solve lin sys.." on the 50g.
Message #2 Posted by Patrick Jamet on 11 Dec 2006, 10:37 a.m.,
in response to message #1 by Ken Ratkevich

Hello Ken,

Did you try to enter the numbers between parenthesis?

For matrix A, enter:

- A11=(10.07,10.07)
- A12=(7.07,7.07)
- A21=(7.07,7.07)
- A22=(7.07,7.07)

For matrix B, enter:

- B11=(10.,<0.)
- B21=(55.,<45.)

For <, enter: right shift 6.

Don't forget to switch to mode Degree. No need to switch to Complex mode.

Best regards.

Patrick

            
Re: Building matrices using "Solve lin sys.." on the 50g.
Message #3 Posted by Ken Ratkevich on 12 Dec 2006, 4:47 a.m.,
in response to message #2 by Patrick Jamet

Hi Patrick,

Thanks for your response.

I've tried everything (I think) and can't find a way to use complex numbers with the matrix editor as accessed thru "Solve lin sys.." This is very frustrating because it looks just like MTRW. Anyway, I have been solving the systems of equations at hand by using MTRW and Cramer's rule.

Thanks again,
Ken

                  
Re: Building matrices using "Solve lin sys.." on the 50g.
Message #4 Posted by Rodger Rosenbaum on 12 Dec 2006, 7:33 a.m.,
in response to message #3 by Ken Ratkevich

If you can create your matrices with MTRW, then go ahead and put the B matrix on the stack first, then the A matrix. Press the divide key and the system will be solved.

Or another way to create the matrices and solve your system without using MTRW is:

Put your calculator in approximate mode and rectangular mode and enter your system like this:

First put the B vector on the stack. Press the purple prefix key and then the "times" key to get [] on the display. Do this again and see [[]] on the display. Don't press "ENTER" yet. With the cursor still pointing between the inner pair of brackets, type the {1,1} element of your vector as (10 <0) so that you have [[ (10 <0) ]] on the display. Type ALPHA, right shift, 6 to get the angle symbol. Press the cursor right key until the cursor is pointing between the 2 right brackets. Now type { 5 <45 ) and then ENTER (even though you enter the complex numbers in polar mode, the calculator immediately converts to rectangular as soon as you press enter). You should see (I'm only showing 5 digits):

[[ (10,0) ]
 [ (2.6266,4.2545) ]]

That is your B vector. Notice that as soon as you type the first complex element, the entire vector (or matrix) becomes complex.

Now press the <purple prefix and times key> sequence twice to get [[]] on the display again. Now type (10.07 10.07), space, (7.07 7.07); this is the first row of the A matrix. Next press the cursor right key until the cursor points between the 2 right brackets. Finish typing the second row of your A matrix and then press ENTER. You should see:

[[ (10.07 10.07)  (7.07 7.07)  ]
 [  (7.07 7.07)   (7.07 7.07)  ]]

Now press the divide key and you will get the solution vector on the stack. What this does is to invert the A matrix and premultiply it times the B vector. Press the MODE key and set the calculator to polar mode if you want to see the solution in polar coordinates.

This method can also be used for larger matrices and vectors. Just type in the first row and then press the cursor right key until the cursor points between the 2 right hand brackets. Then type all the rest of the elements of the matrix (or vector) and press ENTER.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall