Post Reply 
CAS versus HOME confusion.
01-24-2014, 10:22 PM (This post was last modified: 01-24-2014 10:24 PM by Han.)
Post: #15
RE: CAS versus HOME confusion.
(01-24-2014 08:45 PM)John P Wrote:  What interest me is how to make the 'makelist' work in CAS in program.

You can create a string-equivalent of what you would normally use in the command line in CAS view, and use CAS(). For example: my list:=CAS("makelist(x->x^2,x,1,5)"); would work just fine. If you want something a bit more dynamic, build the string separately as a string variable, and evaluate CAS() on the string variable. For example:

Code:

LOCAL stringcmd;
LOCAL formula:="x->x^2";
LOCAL var:="x";
stringcmd:="makelist(" + formula + "," + var + ", A, B)";
LOCAL mylist;

// at this point, stringcmd = "makelist(x->x^2,x,A,B)"
// A and B are the global variables.
mylist:=CAS(stringcmd);

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
CAS versus HOME confusion. - cdecastro - 01-23-2014, 10:48 AM
RE: CAS versus HOME confusion. - parisse - 01-23-2014, 01:30 PM
RE: CAS versus HOME confusion. - cdecastro - 01-23-2014, 02:24 PM
RE: CAS versus HOME confusion. - eried - 01-23-2014, 02:37 PM
RE: CAS versus HOME confusion. - cdecastro - 01-23-2014, 02:55 PM
RE: CAS versus HOME confusion. - eried - 01-23-2014, 03:42 PM
RE: CAS versus HOME confusion. - John P - 01-23-2014, 04:07 PM
RE: CAS versus HOME confusion. - cdecastro - 01-23-2014, 04:28 PM
RE: CAS versus HOME confusion. - Han - 01-23-2014, 04:51 PM
RE: CAS versus HOME confusion. - Han - 01-24-2014, 07:08 PM
RE: CAS versus HOME confusion. - John P - 01-24-2014, 08:45 PM
RE: CAS versus HOME confusion. - Han - 01-24-2014 10:22 PM
RE: CAS versus HOME confusion. - John P - 01-24-2014, 10:37 PM
RE: CAS versus HOME confusion. - hape - 02-13-2014, 09:12 AM
RE: CAS versus HOME confusion. - parisse - 02-14-2014, 08:21 AM



User(s) browsing this thread: 2 Guest(s)