0
$\begingroup$

I have multiple tables, each two columns, but of various numbers of rows. How can I display them in a format similar to TableForm but next to each other for easy comparison?

Here are two example tables that I am dealing with:

ptFeOphys = DeleteCases[ptFeO, {p_, t_} /; T[p] > t]
{{{38, 1660}, {38, 1670}, {38, 1680}, {38, 1690}, {38, 1700}, {38, 
1710}, {39, 1640}, {39, 1650}, {39, 1660}, {39, 1670}, {39, 
1680}, {39, 1690}, {39, 1700}, {39, 1710}, {39, 1720}, {39, 
1730}, {39, 1740}, {39, 1750}, {40, 1620}, {40, 1630}, {40, 
1640}, {40, 1650}, {40, 1740}, {40, 1750}, {40, 1760}, {40, 
1770}, {40, 1780}, {41, 1610}, {41, 1620}, {41, 1630}, {41, 
1780}, {41, 1790}, {41, 1800}, {42, 1610}, {42, 1620}, {42, 
1810}, {42, 1820}, {42, 1830}, {43, 1600}, {43, 1610}, {43, 
1830}, {43, 1840}, {43, 1850}, {44, 1850}, {44, 1860}, {44, 
1870}, {45, 1870}, {45, 1880}, {46, 1890}, {46, 1900}, {47, 
1910}, {47, 1920}, {48, 1930}, {48, 1940}, {49, 1940}, {49, 
1950}, {50, 1960}, {50, 1970}, {51, 1980}, {52, 1990}, {52, 2000}}

ptSiO2phys = DeleteCases[ptSiO2, {p_, t_} /; T[p] > t]
{{8, 1880}, {12, 1930}, {16, 1980}, {53, 1690}, {53, 1700}, {53, 
1710}, {53, 1720}, {53, 1730}, {53, 1740}, {53, 1750}, {54, 
1690}, {54, 1770}, {54, 1780}, {55, 1800}, {56, 1820}, {57, 
1850}, {58, 1870}, {59, 1890}, {62, 1940}, {63, 1960}, {64, 1980}}

Thank you!

$\endgroup$
  • 1
    $\begingroup$ For matrices a and b you could try Row[{MatrixForm[a], MatrixForm[b]}]. $\endgroup$ – Henrik Schumacher Apr 29 '18 at 23:08
  • $\begingroup$ @HenrikSchumacher It worked! Thank you very much $\endgroup$ – Zack Eriksen Apr 29 '18 at 23:11
  • $\begingroup$ You're welcome. $\endgroup$ – Henrik Schumacher Apr 29 '18 at 23:12
  • 2
    $\begingroup$ also: TableForm[{TableForm /@ {a, b}}, TableAlignments -> Top] $\endgroup$ – kglr Apr 29 '18 at 23:12
  • 3
    $\begingroup$ Advice: post a minimal example. All your code could be replaced with something similar to a = RandomReal[1,{10,15}]; b = RandomReal[1, {8,15}], much more readable and copy-pastable. $\endgroup$ – anderstood Apr 29 '18 at 23:21
1
$\begingroup$

Suppose you have the following two matrices of unequal length

SeedRandom[0];
mat1=RandomReal[1,{7,2}];
mat2=RandomReal[1,{10,2}];

The following command perhaps does what you want,

TableForm[Transpose[PadRight[{mat1,mat2}]]]
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.