If an entry defined the variable a and if in a later
entry defines the variable b (supposed to be dependant on
a), then
c:=as_function_of(b,a) will define a function c such that
c(a)=b.
Input :
Output :
Input :
^
2)Output :
^
2)Input :
Output :
^
2));Input :
Output :
^
2)Input :
Output :
Input :
^
2Output :
Input :
Output :
^
2));Input :
Output :
^
2Warning !!
If the variable b has been assigned
several times, the first affectation of b following the last
affectation of a will be used. Moreover, the order used is the
order of validation of the commandlines,
which may not be reflected by the Xcas interface
if you reused previous commandlines.
Input for example :
a:=2 then
b:=2*a+1 then
b:=3*a+2 then
c:=as_function_of(b,a)
Output :
i.e. c(x) is equal to 2*x+1.
But, input :
a:=2 then
b:=2*a+1 then
a:=2 then
b:=3*a+2 then
c:=as_function_of(b,a)
Output :
i.e. c(x) is equal to 3*x+2.
Hence the line where a is define must be revalided before the good
definition of b.