The following warnings occurred:
Warning [2] Undefined array key 82010 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 82016 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 82056 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 82073 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 82079 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 82093 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 82100 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 82093 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 82100 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





HP 48g+: How do I solve multiple eqns with multiple variables?



#2

I have a hp 48g+ calculator. I need to solve multiple equations (containing complex number) with multiple variables but I do not know how. I was trying to follow the section in the user manual about solving multiple eqns with the Multiple Eqn Solver but I kept getting errors. Can anybody help me with this please? This relates specifically to solving AC circuits using nodal analysis. Thanks!
Tiffany


#3

Say your equations are:

'7*V1 + 11*(V1-V2) = 3'
'5*V2 + 11*(V2-V1) = 2'
Your system matrix should be:

A * X = B

| 18 -11 | | V1 | | 3 |
| | * | | = | |
| -11 16 | | V2 | | 2 |

All you have to do is the following:
[ [ 3 ] [ 2 ] ]

ENTER

[ [ 18 -11 ] [ -11 16 ] ]

/

(in fact, the actual operation is X=B*[A]^-1, since matrices
cannot be divided one by another)


you should obtain

[ [ .419161676647 ]
[ .413173652695 ] ]

Or V1 = 0.419161676647 and
V2 = 0.413173652695

(Of course, you could have complex numbers in your equations, like (3,/_120) or (1.5,2.6) for instance.)

Or just read the manual at page 18-11 (Solving a System of
Linear Equations:)

Green arrow SOLVE ^ ^ OK. Perhaps you find this easier.


You can also use the program below and enter your equations
exactly as they appear:

'7*V1 + 11*(V1-V2) = 3'

ENTER

'5*V2 + 11*(V2-V1) = 2'

ENTER

{ V1 V2 }

SYS

You would get a menu with
V1 = 70/167           

V2 = 68/167

MAT = [ [ 18 -11 3 ]
[ -11 16 2 ]]

EQS = (a list with the two equations)

For clean-up, use .<- (all objects at left will be purged)

Regards,

Gerson.

------------------------------------------------

Program by Francisco Matheus, who has
authorized his free use. He was one of
my colleagues in Circuit Analyses classes
many years ago.
At the time, we ran this program on our
28S's. It was useful as we didn't to rework
the equations by hand to obtain the system
matrix. This saved some time for larger systems
(up to 5 x 5). If results in rational form
are not needed, use ->NUM or change the program.

%%HP: T(2)A(D)F(.);
DIR
·\<-
« VARS 1 OVER
'·\<-' POS 1 - SUB
PURGE
»
SYS
« DUP SIZE \-> l
n
« n \->LIST
'EQS' STO 0 n
FOR i 1 n
FOR j i j
== 1 0 IFTE l j GET
STO
NEXT 1 n
FOR j '
EQS(j)' \->NUM
NEXT n
\->ARRY i
IF NOT
THEN NEG
'VET' STO
ELSE VET
+ ARRY\-> DROP
END
NEXT { n n
} \->ARRY l PURGE TRN
CONJ 'MAT' STO VET
MAT / n 1
FOR i DUP i
GET \->Q l i GET STO
-1
STEP DROP
MAT VET n 1 + COL+
'MAT' STO 'VET'
PURGE
»
»
END

#4

Thanks for the information. I wanted to just be able to put the equations in my calculator as is after finding them from the circuit since the problems usually entail at least 4 equations. I know the TI 89 can do this with a function called 'C Solve' which most of my classmates have. On the test I will not have time to simply these kinds of problems.

One of my problems looks like this:

1) V1-V2 = 10Ix

2) V1/j20 + (V1-V3)/20 + V2/10 + (V2-V3)/-j10 = 0

3) V3/j10 + (V3-V2)/-j10 + 2<-45 + (V3-V1)/20 = 0

4) Ix = -V3/j10

where:
j is sqrt of -1
all V's and I are phasors
2<-45 is 2 angle -45

And if the HP 48g is not able to do this, do you know if the 49 is able to do so? I have had my calcualtor for about 8 years and I was thinking of upgrading anyways. Thanks again for the help!
Tiffany


#5

Using the given program, you'd enter the four equations and the list of unknowns on the stack:


'V1-V2 = 10*IX'

'V1/(0,20) + (V1-V3)/20 + V2/10 + (V2-V3)/(0,-10) = 0'

'V3/(0,10) + (V3-V2)/(0,-10) + (2,|_-45) + (V3-V1)/20 = 0'

'IX = -V3/(0,10)'

{V1 V2 V3 IX}

In the second equation, |_ stands for the angle symbols (right arrow + SPC). Notice that if your calculator is in rectangular mode, as soon as you enter this equation (2,|_-45) will be automatically converted to rectangular coordinates.

After entering these five objects, just press SYS. The answer will show up in about 15 seconds. It is necessary to press left arrow + EVAL, that is, ->NUM, since the answer will be in a rational form. It will be convenient to identify the section at the end of the program that does this and eliminate it.


If I haven't made any mistake, the answer will be:

V1=(-1.886,-24.513)
V2=(-1.886,-5.657)
V3=(-18.856,0.000)
IX=(0.000,-1.886)

Change the coordinate mode to polar, if you need the answer this way.
You might want to press EQS in the menu, then VIEW, and check if the equations were keyed in correctly.


You should replace IX in the first equation with -V3/(0,10), so that you have to solve a 3x3 system rather than a 4x4 one.

As you can see, there's no need to upgrade your 48G+ just because of this. By the way, I haven't been able to put this program to work in the 49G (perhaps I should also read the manual).

Regards,

Gerson.

--------------------------

P. S.:

You can copy and paste the program to a file named LSYS, for instance, and then transfer it to the 48G+ (ASCII, cksum=3, translate=2). Or create a directory named 'LSYS' and key in both programs.

Just replace

\<- with <- (right arrow + 0)

Save the first program as '.<-' and the second as 'SYS', in this order.


#6

Thank you so much for your help!!
Tiffany


#7

Hold on to that 48G+!! It's hard to "upgrade" that unless you get a 48GX or... dream of dreams... get a 41CX!

#8

You're welcome!

I wrote:

Quote:
It will be convenient to identify the section at the end of the program that does this and eliminate it.

Just remove \->Q in the 9th line from the last.

Correction: This program won't run on the HP-28S and on the 48 series, because they lack the COL+ instruction . This is due to a slight modification I made later. Matheus's original program ends like this:

    FOR i DUP i GET 
l i GET STO -1
STEP VET ARRY\->
DROP {n 1} \->ARRY
'VET' STO DROP
»
»

Regards,

Gerson


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP: Dump the predefined variables! bluesun08 12 3,658 11-19-2013, 02:18 PM
Last Post: bluesun08
  HP Prime - local variables retain their initial type BruceH 4 1,818 11-10-2013, 12:42 PM
Last Post: Michael de Estrada
  XCas / Prime "solve" question Nigel J Dowrick 4 1,946 11-08-2013, 04:01 AM
Last Post: Nigel J Dowrick
  Shutdown with the Apps key and more than 10 variables in a program. Davi Ribeiro de Oliveira 10 3,750 11-05-2013, 01:26 PM
Last Post: Han
  HP Prime: Number of external Variables Davi Ribeiro de Oliveira 0 979 11-01-2013, 08:10 PM
Last Post: Davi Ribeiro de Oliveira
  HP Prime variables Davi Ribeiro de Oliveira 3 1,601 10-31-2013, 02:24 AM
Last Post: cyrille de Brébisson
  HP Prime - deleting variables bluesun08 1 1,190 10-29-2013, 06:36 PM
Last Post: Joe Horn
  HP Prime: CAS Variables - -How to save? Helge Gabert 2 1,754 10-27-2013, 11:26 PM
Last Post: Helge Gabert
  Using the Prime to solve for eigenvalues Michael de Estrada 28 8,333 10-27-2013, 07:21 AM
Last Post: Tarcisi C
  HP Prime Define: Use with solve, etc. Helge Gabert 0 985 10-23-2013, 06:24 PM
Last Post: Helge Gabert

Forum Jump: