Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Freeze Panes in Grid Expression

0 views
Skip to first unread message

Thomas Melehan

unread,
Nov 19, 2009, 5:25:21 AM11/19/09
to
Folks: I often generate a 2D matrix that I would love to be able to view in Mathematica as one does in say Excel, by freezing the window at a certain column and scrolling thru the rest of the columns to the right of the frozen column. I can take the expression and dump it into Excel but it is somewhat time consuming. Does anyone know how to directly achieve this in Mathematica, by say using two panels?

Bob Hanlon

unread,
Nov 21, 2009, 3:38:13 AM11/21/09
to

scrollMatrix[m_?MatrixQ, rows_Integer, columns_Integer] :=
Module[{
nC = Min[columns, Length[m[[1]]]],
nR = Min[rows, Length[m]]},
Manipulate[
Grid[
Drop[m[[1 ;; r + nR - 2]], 2 ;; r - 1]
[[All, {1, Sequence @@ Range[c, c + nC - 2]}]],
Dividers -> {{False, True}, {False, True}}],
{r, 2, Length[m] - nR + 2, 1},
{c, 2, Length[m[[1]]] - nC + 2, 1}]]

m = Array[a, {15, 10}];

scrollMatrix[m, 10, 5]


Bob Hanlon

---- Thomas Melehan <tpme...@me.com> wrote:

=============

0 new messages