HP Prime - CAS functions in Spreadsheet App



#8

Hello,

As I posted in an earlier post, I think the Spreadsheet App may be the most powerful/useful on on the Prime. It certainly seems to be able to do some things that traditional ones cannot.

I spent some time in a new spreadsheet which takes an expression entered in a cell - say =x^3-3*x-1 (in cell C3 which I named Expr1) then other cells contain CAS functions which use/refer to Expr1. Some worked and some did not. I was in Textbook, Minimum, Exact mode.

These WORKED:

=(Expr)',

=Integral(Expr1)dx using math template/integral,

=Integral(Expr1)dx using math template AND referring to named Lower/Upper limits of integration

=CAS.zeros(Expr1)

These had PROBLEMS:

= diff(Expr1) using math template, diff() and/or toolbox/cas/calculus/differentiate

= CAS.int(Expr1) using toolbox/cas/calculus/integrate

= CAS.solve(Expr1,x) and =CAS.nsolve(Expr1,x)

Best,
Carl


#9

Tim provided a better explanation, so I've deleted my post.

Edited: 10 Nov 2013, 12:26 p.m.

#10

When you are entering a forumula you'd like the CAS to evaluate, click the CAS menu key while editing the formula. The CAS parser/evaluator will then evaluate those cells completely.

Edited: 10 Nov 2013, 11:34 a.m.


#11

Thanks for the quick response Tim. Unfortunately, I have already tried enabling the CAS* key when entering - gives the RED CAS indicator, but some functions still not working.

In all the cases below, the cell result looked similar to the cell function but without any evaluation (or incorrectly) executed.

These had PROBLEMS:

= diff(Expr1) using math template, diff() and/or toolbox/cas/calculus/differentiate ==> gives diff(Expr1,x) or 0

= CAS.int(Expr1) using toolbox/cas/calculus/integrate ==> gives int(Expr1,x)

= CAS.solve(Expr1,x) and =CAS.nsolve(Expr1,x) ==> give solve(Expr1,x), nsolve(Expr1,x) respectively. However, CAS.zeros(Expr1) gives accurate roots.

This is still a really cool application.

Best,
Carl

Edited: 10 Nov 2013, 3:30 p.m.


#12

Enter =solve(Expr1) with the CAS toggle set.


#13

THANKS! Works great now.

I didn't know you often need to delete the "CAS." in =CAS.solve() or for other CAS functions. The Toolbox/CAS menu puts the "CAS." in automatically I guess.

Best,
Carl

Edited: 11 Nov 2013, 12:05 a.m.


#14

You use the CAS. prefix in a non-CAS environment such as Home, but just use the function name such as solve or zeros w/o the CAS. prefix in CAS. Go to CAS and insert a CAS function such as solve or zeros from the CAS menu in the Toolbox, and you won't see the CAS. prefix, but you will in Home. The CAS. prefix indicates that you are treating the function as if it were in CAS, and when you toggle the CAS button in the Spreadsheet App, you are treating the function as if it were already in CAS, so there is no need for the CAS. prefix. The easiest way to debug a CAS expression is to first enter it in CAS before inserting it in a Spreadsheet. Also, if a CAS function is being used in a program, the easiest way to make it work is to insert it in the CAS() command, which creates a CAS environment just as the toggle button does in the Spreadsheet. For example, CAS("solve(Expr1)").

Edited: 11 Nov 2013, 12:38 a.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime: CAS taylor Alberto Candel 5 298 12-13-2013, 09:45 PM
Last Post: Alberto Candel
  HP Prime CAS curiosity bluesun08 11 473 12-10-2013, 01:03 PM
Last Post: Han
  [HP-Prime CAS] "Warning, ^ (Command) Is ambiguous on non square matrices"?? CompSystems 1 175 12-07-2013, 07:15 PM
Last Post: CompSystems
  AFTER HP-Prime update, AA1000 DOES NOT CLEAR THE SPREADSHEET Joseph Ec 0 128 12-06-2013, 11:28 PM
Last Post: Joseph Ec
  HP Prime: complex numbers in CAS. Alberto Candel 1 148 12-06-2013, 02:36 PM
Last Post: parisse
  HP Prime: Proper Use of Home View and CAS View James Williams 9 426 12-05-2013, 02:44 PM
Last Post: James Williams
  HP Prime: =f(x):=expression in spreadsheet app CR Haeger 1 155 12-05-2013, 07:53 AM
Last Post: cyrille de Brébisson
  [HP Prime] plotfunc() bug in CAS Chris Pem10 2 183 12-04-2013, 02:46 PM
Last Post: Chris Pem10
  HP Prime Spreadsheet Copy bug Michael de Estrada 1 183 12-03-2013, 11:34 PM
Last Post: Walter B
  HP Prime: Home/CAS? Alasdair McAndrew 11 438 11-26-2013, 02:48 PM
Last Post: Alberto Candel

Forum Jump: