TI calculator programs for pivoting

by David S. Hough

   Pivot for TI-86                     Pivot for TI-82/83

Assumes start matrix in Ans, so     Assumes start matrix in [A].
display it before running PV.

                 Enter pivot row at "?", then column
                 at next "?".  Back up one step by
                 entering 0, 0.  Quit by 2nd Quit.

Program:PV                          Program:PV
:Ans->Z                             :[A]->[G]
:Z->ZZ                              :[G]->[H]
:Lbl A                              :Lbl A
:Input R                            :Input R
:Input C                            :Input C
:If (R==0 and C==0)                 :If (R=0 and C=0)
:Then                               :Then
:ZZ->Z                              :[H]->[G]
:Pause round(Z,3)                   :Pause round([G],3)
:Goto A                             :Goto A
:Else                               :Else
:Z->ZZ                              :[G]->[H]
:End                                :End
:dim Z->D                           :dim([G])->L6
:multR(1/Z(R,C),Z,R)->Z             :*row(1/[G](R,C),[G],R)->[G]
:For(J,1,D(1))                      :For(J,1,L6(1))
:If J/=R        Note: not equal     :If J /=R
:Then                               :Then
:mRAdd(-Z(J,C),Z,R,J)->Z            :*row+(-[G](J,C),[G],R,J)->[G]
:End                                :End
:End                                :End
:Pause round(Z,3)                   :Pause round([G],3)
:Goto A                             :Goto A

Notes:

1. Above I wrote "/=" for the one symbol "not equal".

2. "==" is in 2nd Test, "and" in    2. "=" is in 2nd Test, "and" in
   2nd Base Bool, "round" in 2nd       2nd Test Logic, "round" in
   Math Num, and "dim", "multR",       Math Num, and "dim", "*row",
   and "mRAdd" in 2nd Matrix Ops.      and "*row+" in Matrix Math.
                                       "L6" is a key, 2nd L6.

                                    3. TI-82 only has matrices [A]-[E],
                                       so substitute [D] for [G], 
                                       [E] for [H].