The Museum of HP Calculators

HP Forum Archive 17

[ Return to Index | Top of Index ]

Substitude variables on a array of equations...
Message #1 Posted by regisxp on 18 Apr 2007, 2:29 p.m.

Hi all!

I have a function that retuns me a array with two equations... Something like this:

[x^2+y X^2-2y]

Is there any way that i can use to substitute X and Y by real numbers, like; x=2 and y=1

And get an array with the responses: [5 2]

Thanks a lot!!!

      
Re: Substitude variables on a array of equations...
Message #2 Posted by Vieira, L. C. (Brazil) on 18 Apr 2007, 8:06 p.m.,
in response to message #1 by regisxp

Hi;

one of the simplest way would be creating the variables x and y then attributing them the values you want to. Consider this:

[x^2+y x^2-2y] [ENTER]
2 'x' [STO]
1 'y' [STO]
[->NUM]

Alternatively you can store the initial expression in a separate variable, say 'EQ1', with the following sequence:

[x^2+y x^2-2y] 'EQ1' [STO]
2 'x' [STO]
1 'y' [STO]
'EQ1' [->NUM]
This way, you could attribute x and y other values, say 3 and 4, like this:
3 'x' [STO]
4 'y' [STO]
'EQ1' [->NUM]
There are other ways, for sure. This is one of them, though.

Cheers.

Luiz (Brazil)

(PS: there may be errors, I have no calculator at hands, now...)

Edited: 18 Apr 2007, 8:10 p.m.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall