684
Appendix A: System Routines — Lists and Matrices
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_diag
Declaration:
void
push_diag
(EStackIndex
mat_lst_idx
)
Category(ies):
Lists and Matrices, Math
Description:
For a list, row vector, or column vector pushes onto the estack a square
matrix with the elements of the list or vector on the diagonal and zeroes
elsewhere. For a matrix pushes onto the estack a row vector containing the
diagonal of the matrix.
Inputs:
mat_lst_idx
— Indexes the input list or matrix.
Outputs:
None
Assumptions:
None
Side Effects:
May expand expression stack, cause heap compression, or throw an error.
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus
Differences:
None
See Also:
Example:
Assuming the top of the estack contains a conforming matrix, this example
computes
diag
(
top_estack
)
†
eigvc (mat_idx).
EStackIndex vl, mat_idx;
.
.
.
push_diag ( top_estack );
vl = top_estack;
push_eigvc ( mat_idx );
push_product ( vl, top_estack );