Variable use between CAS and Home.
|
08-27-2017, 08:02 PM
Post: #12
|
|||
|
|||
RE: Variable use between CAS and Home.
Variable use between CAS and Home.
I have written a new user defined function. It change lowercase x, y, z variables to uppercase X, Y, Z variables. I have defined the Name of the function in the follow: CHANGE xyz to XYZ CH xyz 2 XYZ Code: #cas // To use Variables between CAS and Home // Writen by Rudi Steeger // Input an Formular with Lowercase x, y, z Variables // Output Uppercase X, Y, Z Variables // Important Use the Program only in CAS View! CHxyz2XYZ(cmd):= BEGIN RETURN subst(cmd,([x,y,z]) = (trn([['X'],['Y'],['Z']]))); END; #end // Examples (Only in CAS View): // CHxyz2XYZ(2*x*y^2*z+5*x^2-5*y+3*z) // ==> 2*X*Y^2*Z+5*X^2-5*Y+3*Z // f:=2*x*y^2*z+5*x^2-5*y+3*z // ==> 2*x*y^2*z+5*x^2-5*y+3*z // CHxyz2XYZ(f) // ==> 2*X*Y^2*Z+5*X^2-5*Y+3*Z // CHxyz2XYZ(2*x+5*x^2-5) // ==> 5*X^2+2*X-5 // F1:=CHxyz2XYZ(2*x+5*x^2-5) // ==> (X)->2*X+5*X^2-5 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)