2

The Background
I'm trying to program a function for TI-Nspire CAS Handheld. The function should determine the properties of one or more matrices like orthonormality.

The Problem
I don't know how to transmit the matrices as parameters to the function. Does someone know if it's possible, or know any syntax example?

(I was linked here from following site: http://tibasicdev.wikidot.com/forum/t-1150809/parameters-ti-nspire-cas)

Heinrich Ulbricht
  • 10,064
  • 4
  • 54
  • 85
A.Lymphater
  • 73
  • 1
  • 11

2 Answers2

1

Functions defined normally can take matrices as arguments. Here is a screenshot from a Notes window:

enter image description here

soegaard
  • 30,661
  • 4
  • 57
  • 106
1

It depends:

If you are trying to do in TI-Basic you simply pass the matrix as a parameter (if you don't want to do that, store it in a global variable and access it directly).

If you are doing it from a Lua program, it's a little more complicated, because TI-Basic doesn't support tables inside matrices, while Lua does. For example, you could try math.eval("MyCalculatorFunction({{1,2},{3,4}})") which would call the TI-Basicfunction "MyCalculatorFunction" with the 2x2 matrix: [1 2] [3 4]. But you CANNOT do math.eval("MyCalculatorFunction({{{1}}})"), because TI-Basic doesn't support 3D Matrices.

Also, from a Lua script you can only call TI-Basic FUNCTIONS (NOT PROGRAMS). That means, you can't do TI-Basic graphics or pop-up windows from a Lua script.

Promitheas Nikou
  • 511
  • 4
  • 14