Re: Marking pivot elements in a matrix?
- To: mathgroup at smc.vnet.net
- Subject: [mg74939] Re: Marking pivot elements in a matrix?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 12 Apr 2007 04:48:20 -0400 (EDT)
- Organization: Uni Leipzig
- References: <evhuev$34o$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi,
and somthing like:
ShowPivotmark[matrix_?MatrixQ, index_] :=
(RowBox[{"(", GridBox[matrix /. m_?MatrixQ :>
ReplacePart[m,
StyleBox[
Part[matrix, Sequence @@ index],
FontColor -> Red,
FontWeight -> "Bold"], index],
RowLines ->
Table[If[j == First[
index], True, False], {j,
Last[Dimensions[m]]}],
ColumnLines ->
Table[If[i == Last[index],
True, False], {i, First[Dimensions[
m]]}]], ")"}] // DisplayForm)
with
m = Table[Random[Integer, {-2, 2}], {4}, {4}]
ShowPivotmark[m, {3, 2}]
does not help ??
Regards
Jens
jackgold at umich.edu wrote:
> Hi folks,
>
> I am writing notes for a class in which matrix manipulations
> is a necessary and frequent task. At present, when I wish to pick an
> entry of the matrix as a "pivot" I simply write "pivot
> on {2, 3}". It would be nice to enclose the {2, 3} entry in a square or
> circle to indicate it is the pivot entry. I am unable to do this. In
> this same vein, I often have need to put a single vertical (horizontal)
> line through the matrix.
> Mathematica provides the means for putting vertical (horizontal)
> lines in a matrix but it allows only the option of putting lines at
> every column (row). I want to be more selective, say one line
> just before the last column. (This is the standard way of indicating
> that the last column is an augmentation to the original coefficient
> matrix).
>
> Is there any reasonably simple way to do this?
>