ppl program question
|
11-02-2014, 06:01 PM
Post: #1
|
|||
|
|||
ppl program question
In CAS a series of steps with variables containing expressions works symbolically just fine:
r:=[-sin(t)+t,-cos(t)] v:=diff(r,t) a:=diff(v,t) each step retains its symbolic representation, unevaluated, enabling successive computation to proceed. However, a program doing the same thing evaluates each step numerically, thereby losing context for further steps: EXPORT a() BEGIN local a,r,t,v; r:=[t-sin(t),−cos(t)]; v:=diff(r,t); a:=diff(v,t); END; Variable 'r' becomes [0,-1] and the program errors beyond that step. I've tried the quote(Expr) function: "Returns an expression unevaluated," as described in the user guide, which returns 'r'. If possible, how can I make the program behave as if manually entered in cas? Thanks! -Dale- |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
ppl program question - DrD - 11-02-2014 06:01 PM
RE: ppl program question - Han - 11-02-2014, 06:22 PM
RE: ppl program question - dbbotkin - 11-02-2014, 06:26 PM
RE: ppl program question - DrD - 11-03-2014, 05:17 AM
|
User(s) browsing this thread: 1 Guest(s)