Matrix elements

2,914 views
Skip to first unread message

jb

unread,
Jan 16, 2009, 9:15:28 AM1/16/09
to tinspire
Is it possible to refer to a specific entry in a matrix in the
Nspire? Meaning, can I type in, say a12 to get the entry in row 1
column 2 to just be called up?

Nelson Sousa

unread,
Jan 16, 2009, 9:17:40 AM1/16/09
to tins...@googlegroups.com
type in a[1,2] to get the element in row 1, column 2.
the same to store a number in a specific entry of the matrix

Nelson

jb

unread,
Jan 16, 2009, 11:47:37 AM1/16/09
to tinspire
Thanks.....is there also a way to get the coefficients of a polynomial
to quickly be transferred to the elements of a matrix?

On Jan 16, 9:17 am, Nelson Sousa <nso...@gmail.com> wrote:
> type in a[1,2] to get the element in row 1, column 2.the same to store a
> number in a specific entry of the matrix
>
> Nelson
>
> On Fri, Jan 16, 2009 at 14:15, jb <benjami...@deerparkcityschools.org>wrote:
>
>
>
>
>
> > Is it possible to refer to a specific entry in a matrix in the
> > Nspire?  Meaning, can I type in, say a12 to get the entry in row 1
> > column 2 to just be called up?- Hide quoted text -
>
> - Show quoted text -

Nelson Sousa

unread,
Jan 16, 2009, 1:35:17 PM1/16/09
to tins...@googlegroups.com

Take the k-th derivative when x=0. The only term that survives is x^k and you'll have

d^n / dx^n (a_n*x^n + a_{n-1} x^{n-1} + ... + a_1 x + a_0) | x=0 = a_k k!.

(Exercise: Prove this statement!)

So, divide it by k! and there you have it, a nice way to extract a given coefficient from a polinomial.

To get all of them, take the function
seq(((1)/(k!))*D(poly,var,k)|var=0,k,n,0,−1),

where:
D means derivative, and D(poly, var, k) means the k-th derivative of poly with respect to var;
poly is your polinomial;
var is the variable;
n is the order of the polinomial.

This will return a list, where the first element is the coefficient of higher degree and the last one is the 0th order term.

Nelson

Piman

unread,
Jan 16, 2009, 3:32:41 PM1/16/09
to tinspire
Using a TI-Nspire CAS, there's also a simple funtion that you can use.

polyCoeffs(Poly,[Variable]) generates a list with the coefficients.
Use the list to matrix function and you have what you're looking for.

On a non-CAS, it would be far from simple. Nelson's method would work
using nDeriv, though it would be much more cumbersome.
Another cumbersome possibility would be to generate (n+1) points of
the polynomial of degree n, then do a regression. The stat variables
would then give you the coefficients, which could be stored into a
matrix. So, I guess the simplest way would just be to generate the
matrix manually.

Marc Garneau

On Jan 16, 10:35 am, Nelson Sousa <nso...@gmail.com> wrote:
> Take the k-th derivative when x=0. The only term that survives is x^k and
> you'll have
>
> d^n / dx^n (a_n*x^n + a_{n-1} x^{n-1} + ... + a_1 x + a_0) | x=0 = a_k k!.
>
> (Exercise: Prove this statement!)
>
> So, divide it by k! and there you have it, a nice way to extract a given
> coefficient from a polinomial.
>
> To get all of them, take the function
> seq(((1)/(k!))*D(poly,var,k)|var=0,k,n,0,-1),
>
> where:
> D means derivative, and D(poly, var, k) means the k-th derivative of poly
> with respect to var;
> poly is your polinomial;
> var is the variable;
> n is the order of the polinomial.
>
> This will return a list, where the first element is the coefficient of
> higher degree and the last one is the 0th order term.
>
> Nelson
>

Nelson Sousa

unread,
Jan 16, 2009, 5:39:25 PM1/16/09
to tins...@googlegroups.com

I knew about the other way around, the polyeval, where you provide the polinomials coefficients and a value and it would give you the polinomial; i haven't explored the new polinomial functions on Nspire (didn't get to the letter P on the reference manual quite yet). Thanks for the info.

It is, of course, much simpler (though, internally it should be about the same)!

Nelson


2009/1/16 Piman <pi...@telus.net>

JG

unread,
Nov 20, 2016, 10:27:02 PM11/20/16
to tinspire, nso...@gmail.com
I just discovered this.  Thanks, Nelson.  Is this documented somewhere?  Can you explain more completely how "to store a number in a specific entry of the matrix"?
Reply all
Reply to author
Forward
0 new messages