Message Boards Message Boards

0
|
2406 Views
|
5 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Extract the list of TableForm part from a Table.

Posted 2 years ago

I've a table data block which has the InputForm as shown below:

Column[{Grid[{{Row[{Subscript["C", 1], ":"}], "E"}, {Row[{Subscript["C", 2], ":"}], Row[{Superscript["P", 3], Superscript["Q", 2], "", ""}]}, 
    {Row[{Subscript["C", 3], ":"}], Row[{Superscript["P", 6], "", "", ""}]}, {Row[{Subscript["C", 4], ":"}], Row[{Superscript["P", 9], Superscript["Q", 2], "", ""}]}, 
    {Row[{Subscript["C", 5], ":"}], Row[{Row[{Superscript["P", 6], "", "R", ""}], ","}], Row[{Row[{"", Superscript["Q", 3], "", ""}], ","}], 
     Row[{Row[{Superscript["P", 9], Superscript["Q", 3], "R", ""}], ","}], Row[{Row[{"", Superscript["Q", 2], "R", ""}], ","}], 
     Row[{Row[{Superscript["P", 6], "Q", "", ""}], ","}], Row[{Superscript["P", 3], "Q", "R", ""}]}, 
    {Row[{Subscript["C", 6], ":"}], Row[{Row[{Superscript["P", 9], Superscript["Q", 2], "R", ""}], ","}], Row[{Row[{Superscript["P", 3], "Q", "", ""}], ","}], 
     Row[{Row[{"", "Q", "R", ""}], ","}], Row[{Row[{Superscript["P", 3], "", "R", ""}], ","}], Row[{Row[{Superscript["P", 9], Superscript["Q", 3], "", ""}], ","}], 
     Row[{Superscript["P", 6], Superscript["Q", 3], "R", ""}]}, {Row[{Subscript["C", 7], ":"}], Row[{Row[{Superscript["P", 11], "Q", "", ""}], ","}], 
     Row[{Row[{Superscript["P", 8], Superscript["Q", 2], "", ""}], ","}], Row[{Row[{Superscript["P", 5], Superscript["Q", 2], "R", ""}], ","}], 
     Row[{Row[{Superscript["P", 2], Superscript["Q", 3], "R", ""}], ","}], Row[{Row[{Superscript["P", 7], "", "R", ""}], ","}], 
     Row[{Row[{Superscript["P", 4], Superscript["Q", 2], "", ""}], ","}], Row[{Row[{Superscript["P", 4], "Q", "R", ""}], ","}], 
     Row[{"P", Superscript["Q", 3], "", ""}]}, {Row[{Subscript["C", 8], ":"}], Row[{Row[{Superscript["P", 2], Superscript["Q", 3], "", ""}], ","}], 
     Row[{Row[{Superscript["P", 11], "", "", ""}], ","}], Row[{Row[{Superscript["P", 8], "", "R", ""}], ","}], Row[{Row[{Superscript["P", 5], "Q", "R", ""}], ","}], 
     Row[{Row[{Superscript["P", 10], Superscript["Q", 2], "R", ""}], ","}], Row[{Row[{Superscript["P", 7], "", "", ""}], ","}], 
     Row[{Row[{Superscript["P", 7], Superscript["Q", 3], "R", ""}], ","}], Row[{Superscript["P", 4], "Q", "", ""}]}, 
    {Row[{Subscript["C", 9], ":"}], Row[{Row[{Superscript["P", 5], "Q", "", ""}], ","}], Row[{Row[{Superscript["P", 2], Superscript["Q", 2], "", ""}], ","}], 
     Row[{Row[{Superscript["P", 11], Superscript["Q", 2], "R", ""}], ","}], Row[{Row[{Superscript["P", 8], Superscript["Q", 3], "R", ""}], ","}], 
     Row[{Row[{"P", "", "R", ""}], ","}], Row[{Row[{Superscript["P", 10], Superscript["Q", 2], "", ""}], ","}], Row[{Row[{Superscript["P", 10], "Q", "R", ""}], ","}], 
     Row[{Superscript["P", 7], Superscript["Q", 3], "", ""}]}, {Row[{Subscript["C", 10], ":"}], Row[{Row[{Superscript["P", 8], Superscript["Q", 3], "", ""}], ","}], 
     Row[{Row[{Superscript["P", 5], "", "", ""}], ","}], Row[{Row[{Superscript["P", 2], "", "R", ""}], ","}], Row[{Row[{Superscript["P", 11], "Q", "R", ""}], ","}], 
     Row[{Row[{Superscript["P", 4], Superscript["Q", 2], "R", ""}], ","}], Row[{Row[{"P", "", "", ""}], ","}], Row[{Row[{"P", Superscript["Q", 3], "R", ""}], ","}], 
     Row[{Superscript["P", 10], "Q", "", ""}]}, {Row[{Subscript["C", 11], ":"}], Row[{Row[{"", "", "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 8], Superscript["Q", 3], "R", "S"}], ","}], Row[{Row[{Superscript["P", 10], "Q", "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 3], Superscript["Q", 2], "R", "S"}], ","}], Row[{Row[{Superscript["P", 2], Superscript["Q", 2], "", "S"}], ","}], 
     Row[{"P", "", "R", "S"}]}, {Row[{Subscript["C", 12], ":"}], Row[{Row[{Superscript["P", 3], Superscript["Q", 2], "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 11], "Q", "R", "S"}], ","}], Row[{Row[{"P", Superscript["Q", 3], "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 6], "", "R", "S"}], ","}], Row[{Row[{Superscript["P", 5], "", "", "S"}], ","}], 
     Row[{Superscript["P", 4], Superscript["Q", 2], "R", "S"}]}, {Row[{Subscript["C", 13], ":"}], Row[{Row[{Superscript["P", 6], "", "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 2], Superscript["Q", 3], "R", "S"}], ","}], Row[{Row[{Superscript["P", 4], "Q", "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 9], Superscript["Q", 2], "R", "S"}], ","}], Row[{Row[{Superscript["P", 8], Superscript["Q", 2], "", "S"}], ","}], 
     Row[{Superscript["P", 7], "", "R", "S"}]}, {Row[{Subscript["C", 14], ":"}], Row[{Row[{Superscript["P", 9], Superscript["Q", 2], "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 5], "Q", "R", "S"}], ","}], Row[{Row[{Superscript["P", 7], Superscript["Q", 3], "R", "S"}], ","}], 
     Row[{Row[{"", "", "R", "S"}], ","}], Row[{Row[{Superscript["P", 11], "", "", "S"}], ","}], Row[{Superscript["P", 10], Superscript["Q", 2], "R", "S"}]}, 
    {Row[{Subscript["C", 15], ":"}], Row[{Row[{Superscript["P", 4], Superscript["Q", 2], "", "S"}], ","}], Row[{Row[{Superscript["P", 7], "Q", "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 11], "Q", "", "S"}], ","}], Row[{Row[{Superscript["P", 9], Superscript["Q", 3], "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 5], Superscript["Q", 2], "R", "S"}], ","}], Row[{Row[{Superscript["P", 6], Superscript["Q", 3], "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 10], "", "", "S"}], ","}], Row[{Row[{"P", Superscript["Q", 3], "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 5], Superscript["Q", 3], "", "S"}], ","}], Row[{Row[{Superscript["P", 3], "Q", "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 11], "", "R", "S"}], ","}], Row[{"", "Q", "R", "S"}]}, {Row[{Subscript["C", 16], ":"}], 
     Row[{Row[{Superscript["P", 7], "", "", "S"}], ","}], Row[{Row[{Superscript["P", 10], Superscript["Q", 3], "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 2], Superscript["Q", 3], "", "S"}], ","}], Row[{Row[{"", "Q", "", "S"}], ","}], Row[{Row[{Superscript["P", 8], "", "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 9], "Q", "R", "S"}], ","}], Row[{Row[{"P", Superscript["Q", 2], "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 4], "Q", "", "S"}], ","}], Row[{Row[{Superscript["P", 8], "Q", "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 6], Superscript["Q", 3], "", "S"}], ","}], Row[{Row[{Superscript["P", 2], Superscript["Q", 2], "R", "S"}], ","}], 
     Row[{Superscript["P", 3], Superscript["Q", 3], "R", "S"}]}, {Row[{Subscript["C", 17], ":"}], Row[{"", Superscript["Q", 2], "", ""}]}, 
    {Row[{Subscript["C", 18], ":"}], Row[{Superscript["P", 3], "", "", ""}]}, {Row[{Subscript["C", 19], ":"}], 
     Row[{Superscript["P", 6], Superscript["Q", 2], "", ""}]}, {Row[{Subscript["C", 20], ":"}], Row[{Superscript["P", 9], "", "", ""}]}, 
    {Row[{Subscript["C", 21], ":"}], Row[{Row[{Superscript["P", 6], Superscript["Q", 2], "R", ""}], ","}], Row[{Row[{"", "Q", "", ""}], ","}], 
     Row[{Row[{Superscript["P", 9], "Q", "R", ""}], ","}], Row[{Row[{"", "", "R", ""}], ","}], Row[{Row[{Superscript["P", 6], Superscript["Q", 3], "", ""}], ","}], 
     Row[{Superscript["P", 3], Superscript["Q", 3], "R", ""}]}, {Row[{Subscript["C", 22], ":"}], Row[{Row[{Superscript["P", 9], "", "R", ""}], ","}], 
     Row[{Row[{Superscript["P", 3], Superscript["Q", 3], "", ""}], ","}], Row[{Row[{"", Superscript["Q", 3], "R", ""}], ","}], 
     Row[{Row[{Superscript["P", 3], Superscript["Q", 2], "R", ""}], ","}], Row[{Row[{Superscript["P", 9], "Q", "", ""}], ","}], 
     Row[{Superscript["P", 6], "Q", "R", ""}]}, {Row[{Subscript["C", 23], ":"}], Row[{Row[{Superscript["P", 11], Superscript["Q", 3], "", ""}], ","}], 
     Row[{Row[{Superscript["P", 8], "", "", ""}], ","}], Row[{Row[{Superscript["P", 5], "", "R", ""}], ","}], Row[{Row[{Superscript["P", 2], "Q", "R", ""}], ","}], 
     Row[{Row[{Superscript["P", 7], Superscript["Q", 2], "R", ""}], ","}], Row[{Row[{Superscript["P", 4], "", "", ""}], ","}], 
     Row[{Row[{Superscript["P", 4], Superscript["Q", 3], "R", ""}], ","}], Row[{"P", "Q", "", ""}]}, 
    {Row[{Subscript["C", 24], ":"}], Row[{Row[{Superscript["P", 2], "Q", "", ""}], ","}], Row[{Row[{Superscript["P", 11], Superscript["Q", 2], "", ""}], ","}], 
     Row[{Row[{Superscript["P", 8], Superscript["Q", 2], "R", ""}], ","}], Row[{Row[{Superscript["P", 5], Superscript["Q", 3], "R", ""}], ","}], 
     Row[{Row[{Superscript["P", 10], "", "R", ""}], ","}], Row[{Row[{Superscript["P", 7], Superscript["Q", 2], "", ""}], ","}], 
     Row[{Row[{Superscript["P", 7], "Q", "R", ""}], ","}], Row[{Superscript["P", 4], Superscript["Q", 3], "", ""}]}, 
    {Row[{Subscript["C", 25], ":"}], Row[{Row[{Superscript["P", 5], Superscript["Q", 3], "", ""}], ","}], Row[{Row[{Superscript["P", 2], "", "", ""}], ","}], 
     Row[{Row[{Superscript["P", 11], "", "R", ""}], ","}], Row[{Row[{Superscript["P", 8], "Q", "R", ""}], ","}], Row[{Row[{"P", Superscript["Q", 2], "R", ""}], ","}], 
     Row[{Row[{Superscript["P", 10], "", "", ""}], ","}], Row[{Row[{Superscript["P", 10], Superscript["Q", 3], "R", ""}], ","}], 
     Row[{Superscript["P", 7], "Q", "", ""}]}, {Row[{Subscript["C", 26], ":"}], Row[{Row[{Superscript["P", 8], "Q", "", ""}], ","}], 
     Row[{Row[{Superscript["P", 5], Superscript["Q", 2], "", ""}], ","}], Row[{Row[{Superscript["P", 2], Superscript["Q", 2], "R", ""}], ","}], 
     Row[{Row[{Superscript["P", 11], Superscript["Q", 3], "R", ""}], ","}], Row[{Row[{Superscript["P", 4], "", "R", ""}], ","}], 
     Row[{Row[{"P", Superscript["Q", 2], "", ""}], ","}], Row[{Row[{"P", "Q", "R", ""}], ","}], Row[{Superscript["P", 10], Superscript["Q", 3], "", ""}]}, 
    {Row[{Subscript["C", 27], ":"}], Row[{Row[{"", Superscript["Q", 2], "", "S"}], ","}], Row[{Row[{Superscript["P", 8], "Q", "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 10], Superscript["Q", 3], "R", "S"}], ","}], Row[{Row[{Superscript["P", 3], "", "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 2], "", "", "S"}], ","}], Row[{"P", Superscript["Q", 2], "R", "S"}]}, 
    {Row[{Subscript["C", 28], ":"}], Row[{Row[{Superscript["P", 3], "", "", "S"}], ","}], Row[{Row[{Superscript["P", 11], Superscript["Q", 3], "R", "S"}], ","}], 
     Row[{Row[{"P", "Q", "R", "S"}], ","}], Row[{Row[{Superscript["P", 6], Superscript["Q", 2], "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 5], Superscript["Q", 2], "", "S"}], ","}], Row[{Superscript["P", 4], "", "R", "S"}]}, 
    {Row[{Subscript["C", 29], ":"}], Row[{Row[{Superscript["P", 6], Superscript["Q", 2], "", "S"}], ","}], Row[{Row[{Superscript["P", 2], "Q", "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 4], Superscript["Q", 3], "R", "S"}], ","}], Row[{Row[{Superscript["P", 9], "", "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 8], "", "", "S"}], ","}], Row[{Superscript["P", 7], Superscript["Q", 2], "R", "S"}]}, 
    {Row[{Subscript["C", 30], ":"}], Row[{Row[{Superscript["P", 9], "", "", "S"}], ","}], Row[{Row[{Superscript["P", 5], Superscript["Q", 3], "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 7], "Q", "R", "S"}], ","}], Row[{Row[{"", Superscript["Q", 2], "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 11], Superscript["Q", 2], "", "S"}], ","}], Row[{Superscript["P", 10], "", "R", "S"}]}, 
    {Row[{Subscript["C", 31], ":"}], Row[{Row[{Superscript["P", 4], "", "", "S"}], ","}], Row[{Row[{Superscript["P", 7], Superscript["Q", 3], "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 11], Superscript["Q", 3], "", "S"}], ","}], Row[{Row[{Superscript["P", 9], "Q", "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 5], "", "R", "S"}], ","}], Row[{Row[{Superscript["P", 6], "Q", "R", "S"}], ","}], 
     Row[{Row[{Superscript["P", 10], Superscript["Q", 2], "", "S"}], ","}], Row[{Row[{"P", "Q", "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 5], "Q", "", "S"}], ","}], Row[{Row[{Superscript["P", 3], Superscript["Q", 3], "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 11], Superscript["Q", 2], "R", "S"}], ","}], Row[{"", Superscript["Q", 3], "R", "S"}]}, 
    {Row[{Subscript["C", 32], ":"}], Row[{Row[{Superscript["P", 7], Superscript["Q", 2], "", "S"}], ","}], Row[{Row[{Superscript["P", 10], "Q", "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 2], "Q", "", "S"}], ","}], Row[{Row[{"", Superscript["Q", 3], "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 8], Superscript["Q", 2], "R", "S"}], ","}], Row[{Row[{Superscript["P", 9], Superscript["Q", 3], "R", "S"}], ","}], 
     Row[{Row[{"P", "", "", "S"}], ","}], Row[{Row[{Superscript["P", 4], Superscript["Q", 3], "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 8], Superscript["Q", 3], "", "S"}], ","}], Row[{Row[{Superscript["P", 6], "Q", "", "S"}], ","}], 
     Row[{Row[{Superscript["P", 2], "", "R", "S"}], ","}], Row[{Superscript["P", 3], "Q", "R", "S"}]}}, Alignment -> Left], "", 
  TableForm[{{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 
    {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1}, 
    {1, -1, 1, -1, -1, 1, 1, -1, 1, -1, I, -I, I, -I, I, -I, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, I, -I, I, -I, I, -I}, 
    {1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -I, I, -I, I, -I, I, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -I, I, -I, I, -I, I}, 
    {2, 2, 2, 2, 2, 2, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0}, 
    {2, -2, 2, -2, -2, 2, -1, 1, -1, 1, 0, 0, 0, 0, 0, 0, 2, -2, 2, -2, -2, 2, -1, 1, -1, 1, 0, 0, 0, 0, 0, 0}, 
    {2, 2*I, -2, -2*I, 0, 0, -1, -I, 1, I, 1 - I, 1 + I, -1 + I, -1 - I, 0, 0, 2, 2*I, -2, -2*I, 0, 0, -1, -I, 1, I, 1 - I, 1 + I, -1 + I, -1 - I, 0, 0}, 
    {2, 2*I, -2, -2*I, 0, 0, -1, -I, 1, I, -1 + I, -1 - I, 1 - I, 1 + I, 0, 0, 2, 2*I, -2, -2*I, 0, 0, -1, -I, 1, I, -1 + I, -1 - I, 1 - I, 1 + I, 0, 0}, 
    {2, -2*I, -2, 2*I, 0, 0, -1, I, 1, -I, 1 + I, 1 - I, -1 - I, -1 + I, 0, 0, 2, -2*I, -2, 2*I, 0, 0, -1, I, 1, -I, 1 + I, 1 - I, -1 - I, -1 + I, 0, 0}, 
    {2, -2*I, -2, 2*I, 0, 0, -1, I, 1, -I, -1 - I, -1 + I, 1 + I, 1 - I, 0, 0, 2, -2*I, -2, 2*I, 0, 0, -1, I, 1, -I, -1 - I, -1 + I, 1 + I, 1 - I, 0, 0}, 
    {3, 3, 3, 3, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1, -1, -1, 3, 3, 3, 3, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1, -1, -1}, 
    {3, 3, 3, 3, -1, -1, 0, 0, 0, 0, -1, -1, -1, -1, 1, 1, 3, 3, 3, 3, -1, -1, 0, 0, 0, 0, -1, -1, -1, -1, 1, 1}, 
    {3, -3, 3, -3, 1, -1, 0, 0, 0, 0, I, -I, I, -I, -I, I, 3, -3, 3, -3, 1, -1, 0, 0, 0, 0, I, -I, I, -I, -I, I}, 
    {3, -3, 3, -3, 1, -1, 0, 0, 0, 0, -I, I, -I, I, I, -I, 3, -3, 3, -3, 1, -1, 0, 0, 0, 0, -I, I, -I, I, I, -I}, 
    {4, 4*I, -4, -4*I, 0, 0, 1, I, -1, -I, 0, 0, 0, 0, 0, 0, 4, 4*I, -4, -4*I, 0, 0, 1, I, -1, -I, 0, 0, 0, 0, 0, 0}, 
    {4, -4*I, -4, 4*I, 0, 0, 1, -I, -1, I, 0, 0, 0, 0, 0, 0, 4, -4*I, -4, 4*I, 0, 0, 1, -I, -1, I, 0, 0, 0, 0, 0, 0}, 
    {1, -I, -1, I, -I, -1, -1, I, 1, -I, (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], -1, I, 1, -I, I, 1, 
     1, -I, -1, I, (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2]}, 
    {1, -I, -1, I, -I, -1, -1, I, 1, -I, (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2], -1, I, 1, -I, I, 1, 
     1, -I, -1, I, (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2]}, 
    {1, I, -1, -I, I, -1, -1, -I, 1, I, (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2], (1 - I)/Sqrt[2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], (1 + I)/Sqrt[2], -1, -I, 1, I, -I, 1, 
     1, I, -1, -I, (1 - I)/Sqrt[2], (1 + I)/Sqrt[2], (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2]}, 
    {1, I, -1, -I, I, -1, -1, -I, 1, I, (1 - I)/Sqrt[2], (1 + I)/Sqrt[2], (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2], -1, -I, 1, I, -I, 1, 
     1, I, -1, -I, (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2], (1 - I)/Sqrt[2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], (1 + I)/Sqrt[2]}, 
    {2, -2*I, -2, 2*I, -2*I, -2, 1, -I, -1, I, 0, 0, 0, 0, 0, 0, -2, 2*I, 2, -2*I, 2*I, 2, -1, I, 1, -I, 0, 0, 0, 0, 0, 0}, 
    {2, 2*I, -2, -2*I, 2*I, -2, 1, I, -1, -I, 0, 0, 0, 0, 0, 0, -2, -2*I, 2, 2*I, -2*I, 2, -1, -I, 1, I, 0, 0, 0, 0, 0, 0}, 
    {2, -2, 2, -2, 0, 0, 1, -1, 1, -1, (-I)*Sqrt[2], I*Sqrt[2], (-I)*Sqrt[2], I*Sqrt[2], 0, 0, -2, 2, -2, 2, 0, 0, -1, 1, -1, 1, I*Sqrt[2], (-I)*Sqrt[2], I*Sqrt[2], 
     (-I)*Sqrt[2], 0, 0}, {2, -2, 2, -2, 0, 0, 1, -1, 1, -1, I*Sqrt[2], (-I)*Sqrt[2], I*Sqrt[2], (-I)*Sqrt[2], 0, 0, -2, 2, -2, 2, 0, 0, -1, 1, -1, 1, (-I)*Sqrt[2], 
     I*Sqrt[2], (-I)*Sqrt[2], I*Sqrt[2], 0, 0}, {2, 2, 2, 2, 0, 0, 1, 1, 1, 1, -Sqrt[2], -Sqrt[2], -Sqrt[2], -Sqrt[2], 0, 0, -2, -2, -2, -2, 0, 0, -1, -1, -1, -1, 
     Sqrt[2], Sqrt[2], Sqrt[2], Sqrt[2], 0, 0}, {2, 2, 2, 2, 0, 0, 1, 1, 1, 1, Sqrt[2], Sqrt[2], Sqrt[2], Sqrt[2], 0, 0, -2, -2, -2, -2, 0, 0, -1, -1, -1, -1, 
     -Sqrt[2], -Sqrt[2], -Sqrt[2], -Sqrt[2], 0, 0}, {3, -3*I, -3, 3*I, I, 1, 0, 0, 0, 0, (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], 
     (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2], -3, 3*I, 3, -3*I, -I, -1, 0, 0, 0, 0, (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2], (1 + I)/Sqrt[2], 
     (1 - I)/Sqrt[2]}, {3, -3*I, -3, 3*I, I, 1, 0, 0, 0, 0, (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], 
     -3, 3*I, 3, -3*I, -I, -1, 0, 0, 0, 0, (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], (-1 - I)/Sqrt[2], (-1 + I)/Sqrt[2]}, 
    {3, 3*I, -3, -3*I, -I, 1, 0, 0, 0, 0, (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2], (1 - I)/Sqrt[2], (1 + I)/Sqrt[2], (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2], -3, -3*I, 3, 3*I, 
     I, -1, 0, 0, 0, 0, (1 - I)/Sqrt[2], (1 + I)/Sqrt[2], (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2], (1 - I)/Sqrt[2], (1 + I)/Sqrt[2]}, 
    {3, 3*I, -3, -3*I, -I, 1, 0, 0, 0, 0, (1 - I)/Sqrt[2], (1 + I)/Sqrt[2], (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2], (1 - I)/Sqrt[2], (1 + I)/Sqrt[2], -3, -3*I, 3, 3*I, I, 
     -1, 0, 0, 0, 0, (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2], (1 - I)/Sqrt[2], (1 + I)/Sqrt[2], (-1 + I)/Sqrt[2], (-1 - I)/Sqrt[2]}, 
    {4, -4, 4, -4, 0, 0, -1, 1, -1, 1, 0, 0, 0, 0, 0, 0, -4, 4, -4, 4, 0, 0, 1, -1, 1, -1, 0, 0, 0, 0, 0, 0}, 
    {4, 4, 4, 4, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, -4, -4, -4, -4, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}}, 
   TableHeadings -> {{Subscript["R", 1], Subscript["R", 2], Subscript["R", 3], Subscript["R", 4], Subscript["R", 5], Subscript["R", 6], Subscript["R", 7], 
      Subscript["R", 8], Subscript["R", 9], Subscript["R", 10], Subscript["R", 11], Subscript["R", 12], Subscript["R", 13], Subscript["R", 14], Subscript["R", 15], 
      Subscript["R", 16], Subscript["R", 17], Subscript["R", 18], Subscript["R", 19], Subscript["R", 20], Subscript["R", 21], Subscript["R", 22], Subscript["R", 23], 
      Subscript["R", 24], Subscript["R", 25], Subscript["R", 26], Subscript["R", 27], Subscript["R", 28], Subscript["R", 29], Subscript["R", 30], Subscript["R", 31], 
      Subscript["R", 32]}, {Subscript["C", 1], Subscript["C", 2], Subscript["C", 3], Subscript["C", 4], Subscript["C", 5], Subscript["C", 6], Subscript["C", 7], 
      Subscript["C", 8], Subscript["C", 9], Subscript["C", 10], Subscript["C", 11], Subscript["C", 12], Subscript["C", 13], Subscript["C", 14], Subscript["C", 15], 
      Subscript["C", 16], Subscript["C", 17], Subscript["C", 18], Subscript["C", 19], Subscript["C", 20], Subscript["C", 21], Subscript["C", 22], Subscript["C", 23], 
      Subscript["C", 24], Subscript["C", 25], Subscript["C", 26], Subscript["C", 27], Subscript["C", 28], Subscript["C", 29], Subscript["C", 30], Subscript["C", 31], 
      Subscript["C", 32]}}, TableAlignments -> Right, TableSpacing -> {0.8, 0.8}]}]

I want to extract the TableForm part into a list. Is there any trick to achieve this goal?

Regards, HZ

POSTED BY: Hongyi Zhao
5 Replies
Posted 2 years ago

Hongyi,

I note that there are many cases of a Row calling a Row in your code. Example:

Row[{Row[{Superscript["P", 9], Superscript["Q", 2], "R", ""}], ","}]

What is the reason? Why not just a single Row?:

Row[{Superscript["P", 9], Superscript["Q", 2], "R", ","}]
POSTED BY: Hans Milton
Posted 2 years ago

Hi Hans Milton,

Thank you for pointing this out. However, the code snippets I posted are not entered manually, but are generated by the following command of the SpaceGroupIrep package:

<< SpaceGroupIrep`

showAGCharTab[192, 1] // InputForm

And furthermore, I also checked the source code and there was no such code at all:

$ ugrep  'Superscript.*\"P\",' *
examples/test.nb:           Superscript["P", 2], ""}]}, {
examples/test.nb:           Superscript["P", 3], ""}]}, {
examples/test.nb:           Superscript["P", 2], "Q"}]}, {
examples/test.nb:           Superscript["P", 3], "Q"}]}}, TableHeadings -> {{
examples/document and examples.nb:           Superscript["P", 2], "", ""}]}, {
examples/document and examples.nb:           Superscript["P", 3], "", ""}]}, {
examples/document and examples.nb:           Superscript["P", 2], "Q", ""}]}, {
examples/document and examples.nb:           Superscript["P", 3], "Q", ""}]}, {
examples/document and examples.nb:           Superscript["P", 2], "", "R"}]}, {
examples/document and examples.nb:           Superscript["P", 3], "", "R"}]}, {
examples/document and examples.nb:           Superscript["P", 2], "Q", "R"}]}, {
examples/document and examples.nb:           Superscript["P", 3], "Q", "R"}]}}, TableHeadings -> {{

OTOH, I also examined the above two methods for generating the required string. It seems that they both have many Row commands:

In[23]:= Row[{Row[{Superscript["P", 9], Superscript["Q", 2], "R", 
    ""}], ","}]
Row[{Superscript["P", 9], Superscript["Q", 2], "R", ","}]
Row[{Row[{Superscript["P", 9], Superscript["Q", 2], "R", ""}], ","}] ==
  Row[{Superscript["P", 9], Superscript["Q", 2], "R", ","}]

Out[23]= Row[{Row[{Row[{"P", 9}], Row[{"Q", 2}], "R", ""}], ","}]

Out[24]= Row[{Row[{"P", 9}], Row[{"Q", 2}], "R", ","}]

Out[25]= Row[{Row[{Row[{"P", 9}], Row[{"Q", 2}], "R", ""}], ","}] == 
 Row[{Row[{"P", 9}], Row[{"Q", 2}], "R", ","}]
POSTED BY: Hongyi Zhao
Posted 2 years ago

You can use Cases to find elements that have head TableForm (I've saved your data in a variable called theData):

Cases[theData, _TableForm, Infinity]

This will give you a list, and in your case there is only one. We can extract that single one with Part:

Cases[theData, _TableForm, Infinity][[1]]

Presumabley the "list" you want is the first argument of the TableForm, so we can go another level with Part:

Cases[theData, _TableForm, Infinity][[1, 1]]

If you know you only have one TableForm, or if you only care about the first TableForm, you could use FirstCase.

POSTED BY: Eric Rimbey
Posted 2 years ago

Hi Eric Rimbey,

Wonderful trick. The problem now becomes the following, which is the real goal of this question:

The aAGCharTab1921 and bAGCharTab1921 are two matrices which can be transformed to the other by permutation of rows and columns. The latter is exactly the one obtained by Cases[theData, _TableForm, Infinity][[1, 1]] method suggested by you:

In[52]:= e[x_] := Exp[2 \[Pi] I/x]
aAGCharTab1921 = {{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, -1, 1, 1, 1, 1, 
    1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1,
     1, -1, -1, -1, 1, -1}, {1, -e[4], -1, 1, 1, 1, 1, 
    e[4], -e[4], -e[4], -1, -1, -1, -1, 1, 1, 1, 1, e[4], 
    e[4], -e[4], -e[4], -1, -1, -1, -1, 1, e[4], e[4], -e[4], -1, 
    e[4]}, {1, e[4], -1, 1, 1, 1, 1, -e[4], e[4], 
    e[4], -1, -1, -1, -1, 1, 1, 1, 1, -e[4], -e[4], e[4], 
    e[4], -1, -1, -1, -1, 1, -e[4], -e[4], 
    e[4], -1, -e[4]}, {1, -e[8], e[4], -1, 1, 1, 1, -e[8]^3, 
    e[8], -e[8], -e[4], e[4], e[4], e[4], -1, -1, -1, 1, 
    e[8]^3, -e[8]^3, e[8], -e[8], -e[4], -e[4], -e[4], e[4], -1, 
    e[8]^3, -e[8]^3, e[8], -e[4], e[8]^3}, {1, -e[8]^3, -e[4], -1, 1, 
    1, 1, -e[8], e[8]^3, -e[8]^3, 
    e[4], -e[4], -e[4], -e[4], -1, -1, -1, 1, e[8], -e[8], 
    e[8]^3, -e[8]^3, e[4], e[4], e[4], -e[4], -1, e[8], -e[8], e[8]^3,
     e[4], e[8]}, {1, e[8]^3, -e[4], -1, 1, 1, 1, e[8], -e[8]^3, 
    e[8]^3, e[4], -e[4], -e[4], -e[4], -1, -1, -1, 1, -e[8], 
    e[8], -e[8]^3, e[8]^3, e[4], e[4], e[4], -e[4], -1, -e[8], 
    e[8], -e[8]^3, e[4], -e[8]}, {1, e[8], e[4], -1, 1, 1, 1, 
    e[8]^3, -e[8], e[8], -e[4], e[4], e[4], e[4], -1, -1, -1, 
    1, -e[8]^3, e[8]^3, -e[8], e[8], -e[4], -e[4], -e[4], 
    e[4], -1, -e[8]^3, e[8]^3, -e[8], -e[4], -e[8]^3}, {2, 0, 2, 
    2, -1, 2, 2, 0, 0, 0, 2, -1, 2, 2, -1, 2, 2, -1, 0, 0, 0, 0, -1, 
    2, 2, -1, -1, 0, 0, 0, -1, 0}, {2, 0, -2, 2, -1, 2, 2, 0, 0, 
    0, -2, 1, -2, -2, -1, 2, 2, -1, 0, 0, 0, 0, 1, -2, -2, 1, -1, 0, 
    0, 0, 1, 0}, {2, 0, 2, 2, -1, 0, -2, 0, 0, e[8] + e[8]^3, 2, -1, 
    0, -2, -1, 0, -2, 1, 0, e[8] + e[8]^3, 
    e[8] + e[8]^3, -e[8] - e[8]^3, -1, 0, -2, 1, 1, 
    e[8] + e[8]^3, -e[8] - e[8]^3, -e[8] - e[8]^3, 
    1, -e[8] - e[8]^3}, {2, 0, 2, 2, -1, 0, -2, 0, 0, -e[8] - e[8]^3, 
    2, -1, 0, -2, -1, 0, -2, 1, 0, -e[8] - e[8]^3, -e[8] - e[8]^3, 
    e[8] + e[8]^3, -1, 0, -2, 1, 1, -e[8] - e[8]^3, e[8] + e[8]^3, 
    e[8] + e[8]^3, 1, e[8] + e[8]^3}, {2, 0, -2*e[4], -2, -1, 2, 2, 0,
     0, 0, 2*e[4], e[4], -2*e[4], -2*e[4], 1, -2, -2, -1, 0, 0, 0, 
    0, -e[4], 2*e[4], 2*e[4], e[4], 1, 0, 0, 0, -e[4], 0}, {2, 0, 
    2*e[4], -2, -1, 2, 2, 0, 0, 0, -2*e[4], -e[4], 2*e[4], 2*e[4], 
    1, -2, -2, -1, 0, 0, 0, 0, e[4], -2*e[4], -2*e[4], -e[4], 1, 0, 0,
     0, e[4], 0}, {2, 0, -2*e[4], -2, -1, 0, -2, 0, 0, 1 + e[4], 
    2*e[4], e[4], 0, 2*e[4], 1, 0, 2, 1, 0, 
    1 - e[4], -1 - e[4], -1 - e[4], -e[4], 
    0, -2*e[4], -e[4], -1, -1 + e[4], -1 + e[4], 1 + e[4], e[4], 
    1 - e[4]}, {2, 0, 2*e[4], -2, -1, 0, -2, 0, 0, 
    1 - e[4], -2*e[4], -e[4], 0, -2*e[4], 1, 0, 2, 1, 0, 
    1 + e[4], -1 + e[4], -1 + e[4], e[4], 0, 2*e[4], 
    e[4], -1, -1 - e[4], -1 - e[4], 1 - e[4], -e[4], 1 + e[4]}, {2, 
    0, -2*e[4], -2, -1, 0, -2, 0, 0, -1 - e[4], 2*e[4], e[4], 0, 
    2*e[4], 1, 0, 2, 1, 0, -1 + e[4], 1 + e[4], 1 + e[4], -e[4], 
    0, -2*e[4], -e[4], -1, 1 - e[4], 1 - e[4], -1 - e[4], 
    e[4], -1 + e[4]}, {2, 0, 2*e[4], -2, -1, 0, -2, 0, 
    0, -1 + e[4], -2*e[4], -e[4], 0, -2*e[4], 1, 0, 2, 1, 
    0, -1 - e[4], 1 - e[4], 1 - e[4], e[4], 0, 2*e[4], e[4], -1, 
    1 + e[4], 1 + e[4], -1 + e[4], -e[4], -1 - e[4]}, {2, 0, -2, 
    2, -1, 0, -2, 0, 0, -e[8] + e[8]^3, -2, 1, 0, 2, -1, 0, -2, 1, 0, 
    e[8] - e[8]^3, -e[8] + e[8]^3, e[8] - e[8]^3, 1, 0, 2, -1, 1, 
    e[8] - e[8]^3, -e[8] + e[8]^3, 
    e[8] - e[8]^3, -1, -e[8] + e[8]^3}, {2, 0, -2, 2, -1, 0, -2, 0, 0,
     e[8] - e[8]^3, -2, 1, 0, 2, -1, 0, -2, 1, 0, -e[8] + e[8]^3, 
    e[8] - e[8]^3, -e[8] + e[8]^3, 1, 0, 2, -1, 1, -e[8] + e[8]^3, 
    e[8] - e[8]^3, -e[8] + e[8]^3, -1, e[8] - e[8]^3}, {3, 1, 3, 3, 
    0, -1, 3, 1, 1, -1, 3, 0, -1, 3, 0, -1, 3, 0, 1, -1, -1, -1, 
    0, -1, 3, 0, 0, -1, -1, -1, 0, -1}, {3, -1, 3, 3, 0, -1, 
    3, -1, -1, 1, 3, 0, -1, 3, 0, -1, 3, 0, -1, 1, 1, 1, 0, -1, 3, 0, 
    0, 1, 1, 1, 0, 1}, {3, e[8]^3, -3*e[4], -3, 0, -1, 3, 
    e[8], -e[8]^3, -e[8]^3, 3*e[4], 0, e[4], -3*e[4], 0, 1, -3, 
    0, -e[8], -e[8], e[8]^3, -e[8]^3, 0, -e[4], 3*e[4], 0, 0, 
    e[8], -e[8], e[8]^3, 0, e[8]}, {3, -e[8]^3, -3*e[4], -3, 0, -1, 
    3, -e[8], e[8]^3, e[8]^3, 3*e[4], 0, e[4], -3*e[4], 0, 1, -3, 0, 
    e[8], e[8], -e[8]^3, e[8]^3, 0, -e[4], 3*e[4], 0, 0, -e[8], 
    e[8], -e[8]^3, 0, -e[8]}, {3, e[8], 3*e[4], -3, 0, -1, 3, 
    e[8]^3, -e[8], -e[8], -3*e[4], 0, -e[4], 3*e[4], 0, 1, -3, 
    0, -e[8]^3, -e[8]^3, e[8], -e[8], 0, e[4], -3*e[4], 0, 0, 
    e[8]^3, -e[8]^3, e[8], 0, e[8]^3}, {3, -e[8], 3*e[4], -3, 0, -1, 
    3, -e[8]^3, e[8], e[8], -3*e[4], 0, -e[4], 3*e[4], 0, 1, -3, 0, 
    e[8]^3, e[8]^3, -e[8], e[8], 0, e[4], -3*e[4], 0, 0, -e[8]^3, 
    e[8]^3, -e[8], 0, -e[8]^3}, {3, e[4], -3, 3, 0, -1, 3, -e[4], 
    e[4], -e[4], -3, 0, 1, -3, 0, -1, 3, 0, -e[4], e[4], -e[4], -e[4],
     0, 1, -3, 0, 0, e[4], e[4], -e[4], 0, e[4]}, {3, -e[4], -3, 3, 
    0, -1, 3, e[4], -e[4], e[4], -3, 0, 1, -3, 0, -1, 3, 0, 
    e[4], -e[4], e[4], e[4], 0, 1, -3, 0, 0, -e[4], -e[4], e[4], 
    0, -e[4]}, {4, 0, 4, 4, 1, 0, -4, 0, 0, 0, 4, 1, 0, -4, 1, 
    0, -4, -1, 0, 0, 0, 0, 1, 0, -4, -1, -1, 0, 0, 0, -1, 0}, {4, 
    0, -4, 4, 1, 0, -4, 0, 0, 0, -4, -1, 0, 4, 1, 0, -4, -1, 0, 0, 0, 
    0, -1, 0, 4, 1, -1, 0, 0, 0, 1, 0}, {4, 0, -4*e[4], -4, 1, 0, -4, 
    0, 0, 0, 4*e[4], -e[4], 0, 4*e[4], -1, 0, 4, -1, 0, 0, 0, 0, e[4],
     0, -4*e[4], e[4], 1, 0, 0, 0, -e[4], 0}, {4, 0, 4*e[4], -4, 1, 
    0, -4, 0, 0, 0, -4*e[4], e[4], 0, -4*e[4], -1, 0, 4, -1, 0, 0, 0, 
    0, -e[4], 0, 4*e[4], -e[4], 1, 0, 0, 0, e[4], 0}};

In[21]:= << SpaceGroupIrep`

theData = showAGCharTab[192, 1] // InputForm;

In[54]:= bAGCharTab1921 = Cases[theData, _TableForm, Infinity][[1, 1]]

Out[54]= {{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 
  1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
  1, -1, -1, -1, -1, -1, -1}, {1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 
  I, -I, I, -I, I, -I, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, I, -I, 
  I, -I, I, -I}, {1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -I, I, -I, I, -I,
   I, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -I, I, -I, I, -I, I}, {2, 2, 
  2, 2, 2, 2, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 
  2, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0}, {2, -2, 2, -2, -2, 2, -1, 
  1, -1, 1, 0, 0, 0, 0, 0, 0, 2, -2, 2, -2, -2, 2, -1, 1, -1, 1, 0, 0,
   0, 0, 0, 0}, {2, 2 I, -2, -2 I, 0, 0, -1, -I, 1, I, 1 - I, 
  1 + I, -1 + I, -1 - I, 0, 0, 2, 2 I, -2, -2 I, 0, 0, -1, -I, 1, I, 
  1 - I, 1 + I, -1 + I, -1 - I, 0, 0}, {2, 2 I, -2, -2 I, 0, 
  0, -1, -I, 1, I, -1 + I, -1 - I, 1 - I, 1 + I, 0, 0, 2, 
  2 I, -2, -2 I, 0, 0, -1, -I, 1, I, -1 + I, -1 - I, 1 - I, 1 + I, 0, 
  0}, {2, -2 I, -2, 2 I, 0, 0, -1, I, 1, -I, 1 + I, 
  1 - I, -1 - I, -1 + I, 0, 0, 2, -2 I, -2, 2 I, 0, 0, -1, I, 1, -I, 
  1 + I, 1 - I, -1 - I, -1 + I, 0, 0}, {2, -2 I, -2, 2 I, 0, 0, -1, I,
   1, -I, -1 - I, -1 + I, 1 + I, 1 - I, 0, 0, 2, -2 I, -2, 2 I, 0, 
  0, -1, I, 1, -I, -1 - I, -1 + I, 1 + I, 1 - I, 0, 0}, {3, 3, 3, 
  3, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1, -1, -1, 3, 3, 3, 3, -1, -1, 0, 0,
   0, 0, 1, 1, 1, 1, -1, -1}, {3, 3, 3, 3, -1, -1, 0, 0, 0, 
  0, -1, -1, -1, -1, 1, 1, 3, 3, 3, 3, -1, -1, 0, 0, 0, 
  0, -1, -1, -1, -1, 1, 1}, {3, -3, 3, -3, 1, -1, 0, 0, 0, 0, I, -I, 
  I, -I, -I, I, 3, -3, 3, -3, 1, -1, 0, 0, 0, 0, I, -I, I, -I, -I, 
  I}, {3, -3, 3, -3, 1, -1, 0, 0, 0, 0, -I, I, -I, I, I, -I, 3, -3, 
  3, -3, 1, -1, 0, 0, 0, 0, -I, I, -I, I, I, -I}, {4, 4 I, -4, -4 I, 
  0, 0, 1, I, -1, -I, 0, 0, 0, 0, 0, 0, 4, 4 I, -4, -4 I, 0, 0, 1, 
  I, -1, -I, 0, 0, 0, 0, 0, 0}, {4, -4 I, -4, 4 I, 0, 0, 1, -I, -1, I,
   0, 0, 0, 0, 0, 0, 4, -4 I, -4, 4 I, 0, 0, 1, -I, -1, I, 0, 0, 0, 0,
   0, 0}, {1, -I, -1, I, -I, -1, -1, I, 
  1, -I, -((1 + I)/Sqrt[2]), -((1 - I)/Sqrt[2]), (1 + I)/Sqrt[2], (
  1 - I)/Sqrt[2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], -1, I, 1, -I, I, 
  1, 1, -I, -1, I, (1 + I)/Sqrt[2], (1 - I)/Sqrt[
  2], -((1 + I)/Sqrt[2]), -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2]), -((
   1 - I)/Sqrt[2])}, {1, -I, -1, I, -I, -1, -1, I, 1, -I, (1 + I)/
  Sqrt[2], (1 - I)/Sqrt[
  2], -((1 + I)/Sqrt[2]), -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2]), -((
   1 - I)/Sqrt[2]), -1, I, 1, -I, I, 1, 1, -I, -1, 
  I, -((1 + I)/Sqrt[2]), -((1 - I)/Sqrt[2]), (1 + I)/Sqrt[2], (1 - I)/
  Sqrt[2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2]}, {1, I, -1, -I, 
  I, -1, -1, -I, 1, I, -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2]), (
  1 - I)/Sqrt[2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], (1 + I)/Sqrt[
  2], -1, -I, 1, I, -I, 1, 1, I, -1, -I, (1 - I)/Sqrt[2], (1 + I)/
  Sqrt[2], -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2]), -((1 - I)/Sqrt[
   2]), -((1 + I)/Sqrt[2])}, {1, I, -1, -I, I, -1, -1, -I, 1, I, (
  1 - I)/Sqrt[2], (1 + I)/Sqrt[
  2], -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2]), -((1 - I)/Sqrt[2]), -((
   1 + I)/Sqrt[2]), -1, -I, 1, I, -I, 1, 1, 
  I, -1, -I, -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2]), (1 - I)/Sqrt[
  2], (1 + I)/Sqrt[2], (1 - I)/Sqrt[2], (1 + I)/Sqrt[
  2]}, {2, -2 I, -2, 2 I, -2 I, -2, 1, -I, -1, I, 0, 0, 0, 0, 0, 
  0, -2, 2 I, 2, -2 I, 2 I, 2, -1, I, 1, -I, 0, 0, 0, 0, 0, 0}, {2, 
  2 I, -2, -2 I, 2 I, -2, 1, I, -1, -I, 0, 0, 0, 0, 0, 0, -2, -2 I, 2,
   2 I, -2 I, 2, -1, -I, 1, I, 0, 0, 0, 0, 0, 0}, {2, -2, 2, -2, 0, 0,
   1, -1, 1, -1, -I Sqrt[2], I Sqrt[2], -I Sqrt[2], I Sqrt[2], 0, 
  0, -2, 2, -2, 2, 0, 0, -1, 1, -1, 1, I Sqrt[2], -I Sqrt[2], 
  I Sqrt[2], -I Sqrt[2], 0, 0}, {2, -2, 2, -2, 0, 0, 1, -1, 1, -1, 
  I Sqrt[2], -I Sqrt[2], I Sqrt[2], -I Sqrt[2], 0, 0, -2, 2, -2, 2, 0,
   0, -1, 1, -1, 1, -I Sqrt[2], I Sqrt[2], -I Sqrt[2], I Sqrt[2], 0, 
  0}, {2, 2, 2, 2, 0, 0, 1, 1, 1, 
  1, -Sqrt[2], -Sqrt[2], -Sqrt[2], -Sqrt[2], 0, 0, -2, -2, -2, -2, 0, 
  0, -1, -1, -1, -1, Sqrt[2], Sqrt[2], Sqrt[2], Sqrt[2], 0, 0}, {2, 2,
   2, 2, 0, 0, 1, 1, 1, 1, Sqrt[2], Sqrt[2], Sqrt[2], Sqrt[2], 0, 
  0, -2, -2, -2, -2, 0, 
  0, -1, -1, -1, -1, -Sqrt[2], -Sqrt[2], -Sqrt[2], -Sqrt[2], 0, 
  0}, {3, -3 I, -3, 3 I, I, 1, 0, 0, 0, 
  0, -((1 + I)/Sqrt[2]), -((1 - I)/Sqrt[2]), (1 + I)/Sqrt[2], (1 - I)/
  Sqrt[2], -((1 + I)/Sqrt[2]), -((1 - I)/Sqrt[2]), -3, 3 I, 
  3, -3 I, -I, -1, 0, 0, 0, 0, (1 + I)/Sqrt[2], (1 - I)/Sqrt[
  2], -((1 + I)/Sqrt[2]), -((1 - I)/Sqrt[2]), (1 + I)/Sqrt[2], (
  1 - I)/Sqrt[2]}, {3, -3 I, -3, 3 I, I, 1, 0, 0, 0, 0, (1 + I)/Sqrt[
  2], (1 - I)/Sqrt[2], -((1 + I)/Sqrt[2]), -((1 - I)/Sqrt[2]), (
  1 + I)/Sqrt[2], (1 - I)/Sqrt[2], -3, 3 I, 3, -3 I, -I, -1, 0, 0, 0, 
  0, -((1 + I)/Sqrt[2]), -((1 - I)/Sqrt[2]), (1 + I)/Sqrt[2], (1 - I)/
  Sqrt[2], -((1 + I)/Sqrt[2]), -((1 - I)/Sqrt[2])}, {3, 
  3 I, -3, -3 I, -I, 1, 0, 0, 0, 
  0, -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2]), (1 - I)/Sqrt[2], (1 + I)/
  Sqrt[2], -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2]), -3, -3 I, 3, 3 I, 
  I, -1, 0, 0, 0, 0, (1 - I)/Sqrt[2], (1 + I)/Sqrt[
  2], -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2]), (1 - I)/Sqrt[2], (
  1 + I)/Sqrt[2]}, {3, 3 I, -3, -3 I, -I, 1, 0, 0, 0, 0, (1 - I)/Sqrt[
  2], (1 + I)/Sqrt[2], -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2]), (
  1 - I)/Sqrt[2], (1 + I)/Sqrt[2], -3, -3 I, 3, 3 I, I, -1, 0, 0, 0, 
  0, -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2]), (1 - I)/Sqrt[2], (1 + I)/
  Sqrt[2], -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2])}, {4, -4, 4, -4, 0, 
  0, -1, 1, -1, 1, 0, 0, 0, 0, 0, 0, -4, 4, -4, 4, 0, 0, 1, -1, 1, -1,
   0, 0, 0, 0, 0, 0}, {4, 4, 4, 4, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 
  0, 0, -4, -4, -4, -4, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}}

Now, I want to find out the permutation of rows and columns which can transform aAGCharTab1921 to bAGCharTab1921 or vice versa. Any hints to achieve this goal? I also attached the notebook, FYI.

Regards, HZ

Attachments:
POSTED BY: Hongyi Zhao
Posted 2 years ago

The brute force way is to save that code (say to x). Then look at "parts" until you find what you want. In this case x[[1,3]] gets you the TableForm.

The more direct approach is to use Cases:

Cases[x, _TableForm, Infinity]

I mention the brute force approach first because sometimes one has no idea what the name of the part is although one recognizes the needed part when using FullForm on the complete variable.

(oops! To slow to add Cases. Eric Rimbey has the desired answer.)

POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract