EasyManua.ls Logo

Texas Instruments TI-92+ - [3.28] Fill a List or Matrix with a Constant; [3.29] Convert Data Variables to Matrices

Texas Instruments TI-92+
507 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
For j,i+1,n
m[j,i]r
If not is_0(r) Then
r*m[i]-p*m[j]m[j]
q*pq
EndIf
EndFor
EndFor
Return
1/q*‹(m[k,k],k,1,n-3)*(m[n-2,n-2]*(m[n-1,n-1]*m[n,n]-m[n-1,n]*m[n,n-1])-m[n-2,n-1]*(m[n-1
,n-2]*m[n,n]-m[n-1,n]*m[n,n-2])+m[n-2,n]*(m[n-1,n-2]*m[n,n-1]-m[n-1,n-1]*m[n,n-2]))
EndFunc
[3.28] Fill a list or matrix with a constant
The built-in Fill command will fill a list or matrix with a constant expression, but it is not a function and
cannot be used in TI Basic functions, nor return the result to the entry line. fill_lm() shown below is a
true function replacement for Fill, and also shows a method to use a single function to return either a
list or matrix.
fill_lm(e,d)
Func
©(expr,{dim}) or (expr,[row,col])
©Fill matrix or list
©23jun02/dburkett@infinet.com
local τ
gettype (d)→τ
© (This expression is all one line)
when(τ="LIST",seq(e,k,1,d[1]),when(τ="MAT",listmat(seq(e,k,1,d[1,1]*d[1,2]),d[1,2]),"fil
l_lm err"))
EndFunc
fill_lm() returns a filled list or matrix, as determined by the type of argument d. If d is a list, a list is
returned, and if d is a matrix, a matrix is returned. The contents of d specify the list or matrix
dimensions. For example,
fill_lm(a,{3})
returns {a,a,a}
fill_lm(a,[2,3])
returns
aaa
aaa
If d is neither a list or a matrix, the error string "fill_lm err" is returned.
[3.29] Convert data variables to matrices
You can use the built-in NewData command to convert matrices to data variables, but there is no
complimentary command to convert data variables to matrices. This function does it:
datamat(mσ)
Func
©("name") convert data variable to matrix
©22dec01/dburkett@infinet.com
3 - 35

Table of Contents

Related product manuals