when will be ready a program editor for the CAS MODE ?
|
01-27-2014, 07:28 PM
Post: #13
|
|||
|
|||
RE: when will be ready a program editor for the CAS MODE ?
(01-27-2014 05:55 PM)compsystems Wrote: according to the manual poly2symb and symb2poly, the second argument is a variable, not a string While that is true, you must remember that if you are writing a program, you cannot pass variables the same way you pass them in CAS view. Those are CAS commands, and therefore do not behave the same way in the Home view. symb2poly(expr,var) In CAS mode, you can simply type: symb2poly(x^2+1,x) and get [1 0 1]. However, in Home view, you obviously cannot use x since the parser in Home view only recognizes global variables. So to avoid this problem, you can quote your input: symb2poly("x^2+1","x") Moreover, the var parameter itself can be a variable whose contents is a string representing your variable. This is why: Code:
also works. Your issues seem to stem from not keeping Home and CAS views separate. When executing CAS commands in the Home view, the rules change. And since programs are essentially executed in Home view, you have to account for than when adding in CAS commands into your program. Graph 3D | QPI | SolveSys |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)