Interesting TI Nspire CAS CX programming features Namir Unregistered Posts: 2,247 Threads: 200 Joined: Jun 2005 04-14-2012, 05:04 PM Hi All, I decided to tinker with the TI Nspire CAS CX calculator and do some programming. The first feature that caught my attention is the ability to prompt for an equation (as a function of x). This allows one to write numerical analysis routines (e.g for solving roots and calculating the area under the curve) for equations that the user enters at run-time! The other feature is the creation of matrices and vectors by a program. Here, I had to use a trick to first create an identity square matrix and then over-writing its elements with different values. To create a vector that has the same number of rows as a square matrix, I first create a vector made up of the diagonal elements of the square matrix and then assign new values to the vector. Interestingly, the TI Nspire programming model regards vectors as either column matrices or row matrices. This means that when you access the elements of a vector you have to specify both the row and column indices. This dual orientation has to be monitored during the program development phases so you can correctly access the elements of a vector either as a row or a column matrix. Namir Joerg Woerner Unregistered Posts: 430 Threads: 86 Joined: Jul 2007 04-14-2012, 06:38 PM Namir, Watch it out! Working too long with the CX makes you addicted and you quit using HP calculators... Have a great weekend and happy programming! Cheers, Joerg Namir Unregistered Posts: 2,247 Threads: 200 Joined: Jun 2005 04-14-2012, 11:53 PM The worse part is that I am working with the Teacher version of the CAS CX emulator. So typing in the source code is a easier than on the machine. The ability to declare variable and parameter names that are longer than one or two letters is also addictive!!! Namir Alexander Oestert Unregistered Posts: 429 Threads: 31 Joined: Jul 2011 04-15-2012, 03:16 AM The equation prompting part has been possible on the 50g for ever. Like so: ```<< "Y=" PROMPT 'EQ' STO >> ``` Then you can go on solving or whatever you like to do with that equation. Namir Unregistered Posts: 2,247 Threads: 200 Joined: Jun 2005 04-15-2012, 04:11 PM Way super cool Alexander!!! Thanks for the tip! Namir Namir Unregistered Posts: 2,247 Threads: 200 Joined: Jun 2005 04-15-2012, 04:22 PM I did find the newMat command to create matrices of any size and with zeros as initial value for the matrix elements. The TI Nspire has the construtMat function that creates a matrix of any size and fill its values based on a user-defined expression that uses the indices of the rows and columns. For example, constructMat(1/(i+j),i,j,3,4)->A creates a matrix, A, with 3 rows and 4 columns. The value of each element A(i,j) is based on the values of row index i and column index j using the expression 1/(i+j). Finally, the function randMat creates a matrix of any size with random values in its elements. Namir Edited: 15 Apr 2012, 4:23 p.m. « Next Oldest | Next Newest »

 Possibly Related Threads… Thread Author Replies Views Last Post HP Prime: CAS taylor Alberto Candel 5 3,797 12-13-2013, 09:45 PM Last Post: Alberto Candel HP Prime CAS curiosity bluesun08 11 4,619 12-10-2013, 01:03 PM Last Post: Han [HP-Prime CAS] "Warning, ^ (Command) Is ambiguous on non square matrices"?? CompSystems 1 2,103 12-07-2013, 07:15 PM Last Post: CompSystems HP Prime: complex numbers in CAS. Alberto Candel 1 1,820 12-06-2013, 02:36 PM Last Post: parisse [HP Prime] plotfunc() bug in CAS Chris Pem10 2 2,328 12-04-2013, 02:46 PM Last Post: Chris Pem10 HP-80 History, Design and Interesting Facts BShoring 1 1,286 11-30-2013, 08:50 AM Last Post: Xavier A. (Brazil) HP Prime: Home/CAS? Alasdair McAndrew 11 3,716 11-26-2013, 02:48 PM Last Post: Alberto Candel HP Prime numerical precision in CAS and HOME Javier Goizueta 5 2,313 11-16-2013, 03:51 AM Last Post: Paul Dale Need CAS help Michael de Estrada 6 2,542 11-13-2013, 01:29 AM Last Post: cyrille de BrĂ©bisson HP Prime - CAS functions in Spreadsheet App CR Haeger 6 2,352 11-11-2013, 12:37 AM Last Post: Michael de Estrada

Forum Jump: