HP Forums
Substitude variables on a array of equations... - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Substitude variables on a array of equations... (/thread-112340.html)



Substitude variables on a array of equations... - regisxp - 04-18-2007

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... - Vieira, Luiz C. (Brazil) - 04-18-2007

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.