HP48 Arrays...



#16

Hello!

I'm trying to create an array of simultaneous equations, but the ->ARRY function doesn't seem to be working properly. Can anyone see what I'm doing wrong?

The stack contains:

4: 'X+Y=30'

3: 'Y=Z+2'

2: 'X=14+Z'

1: 3

...and when I issue the ->ARRY function, I get:

->ARRY Error:
Bad Argument Type

I'm totally confused, since the MSLV function REQUIRES an array of the equations!


#17

Hi.

The ~>ARRY command accepts only numerical entries in the HP48 series. IIRC, the HP49 accepts single variables, but I cannot tell you for sure.

You should try:

[1 1 0]
[0 1 -1]
[1 0 -1]
3
to assemble the coefficient matrix, then
[30]
[2]
[14]
3
to assemble the constants vector. Please, check for possible syntax relevance, I am writing by heart.

One question: the MSLV you mention is the MSOLVR? If so, it demands a list of equations (or expressions, I do not recall correctly) stored in the EQ variable.

Cheers.

Luiz (Brazil)


Edited: 16 Apr 2012, 12:40 p.m.


#18

Thanks Luiz! That does appear to be the problem - that strings can't be arguments for ->ARRY. :(

Also, MSLV is the name of the function I wrote about. If you have the 864 page 48gii user's guide it is described on page 7-4.

#19

Looks correct ... This must works

Can you verify that your equations are TYPE 9. ?

Edit : oups... My reponse is for 49-50 (it works perfectly), I do not know about 48.


Edited: 16 Apr 2012, 12:39 p.m.

#20

You might want to try this program. If the stack contains

4: 'X+Y=30'

3: 'Y=Z+2'

2: 'X=14+Z'

1: {X Y Z}

press SYS (F2) to obtain

X (F1)   -->  21.

Y (F2) --> 9.

Z (F3) --> 7.

MAT (F4) --> |1. 1. 0. 30. |
|0. 1. -1. 2. |
|1. 0. -1. 14.|

EQS (F5) --> { 'X+Y=30' 'Y=Z+2' 'X=14+Z' }


#21

Thank you Gerson! :)

#22

With 49/50 you can solve this systems in 2 ways :

1/Use LINSOLVE with vectors

['X+Y=30' 'Y=Z+2' 'X=14+Z'] @ you can use Matrix and equation writer for this
[ 'X' 'Y' 'Z' ] @ It must be _vectors_ and not matrices ( VEC must be check in matrix writer : VEC#)
LINSOLVE @ Shift S.SLV LINSO

->

[ X=21 Y=9 Z=7 ]

This works in symbolic way even with more than 3 unknows for 3 equations

I have forgot that this don't work on 48

|x| |x| -1
2/ Use matrices : M.|y|=V => |y| = M .V
|z| |z|

[[1 1 0] @ With matrix writer type
[0 1 -1] @ 1 1 0 ENTER RShift <- v
[1 0 -1]] @ 0 1 -1 1 0 -1 ENTER

[[30][2][14]] @ With matrix writer 30 ENTER 2 14 ENTER
@ or [] [] 30 -> 2 14 ENTER
SWAP /

->
| 21 |
| 9 |
| 7 |

This works in numeric and symbolic with HP49/50
Only in numeric with my old 48SX (it works here for exemple)


Edited: 16 Apr 2012, 5:12 p.m.


#23

You're right! On the HP-49/50g LINSOLVE is a better option, as I've just checked. On the HP-48, AFAIK, there's no built-in command to do it symbolically though.

#24


#25

Nice solution!! Curious how you invert that matrix?


#26

You can't because it's not a square matrix :D


Edited: 17 Apr 2012, 7:01 a.m.

#27

Quote:
Curious how you invert that matrix?

How about this (especially for Joerg!)

#28

Quote:
...

In fact that is a 4 x 10 matrix ;)

Edited: 16 Apr 2012, 11:40 p.m.


#29

Quote:


In fact that is a 4 x 10 matrix ;)



not for the TI fans :)

#30

This is a unique system: has more solutions in itself than the ones needed to solve it!


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP 50g - question about matrices arrays vectors etc. Sean Freeman 6 2,617 11-14-2013, 01:44 PM
Last Post: peacecalc
  [HP-Prime xCAS] Arrays: Programming Commands (solution to the ambiguity) CompSystems 6 2,714 08-30-2013, 06:32 PM
Last Post: CompSystems

Forum Jump: