Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extract variable's value from solve

Tags:

ti-basic

I'm trying to write a function for a TI-Nspire cx cas calculator. I have to solve a large system, using the built-in solve function. I want to save the result of solve in some variables. For example, if the result is u1=2 and u2=3, I would like to store 2 and 3 respectively in the variables u1 and u2. Does anyone know how to do this automatically in a program?

like image 494
Christian Lorenz Avatar asked Feb 27 '15 10:02

Christian Lorenz


1 Answers

Try exp▶list(Expr,Var) function. Example>

res:=solve({x+2*y=5,x-y=2},{x,y})

x=3 and y=1

l1:=exp▶list(res,{x,y})

[[3,1]]

like image 96
fragg Avatar answered Sep 30 '22 12:09

fragg