Hi guys I would like to get a help organizing my data in table. The attached file is from my Kinetic class. My goals is to organize the data in columns and add new column. I want add 2 new columns: lnK and 1/T ( Arrhenius Equation), and plot lnk vs. 1/T. But I don’t know how to process. I could have done this easily in excel, but my goal is to get used to Mathematica. Please help me on how to do this in the easiest way.
Thank everyone!
One way is to transpose the matrix, Insert the new column (as a simple list), and transpose back:
mat = {{a, b}, {1, 2}};
newColumn = {x, y};
positionWhereToInsert = 2;
Insert[Transpose[mat], newColumn, positionWhereToInsert] // Transpose
I would be glad to learn about a more elegant method.
If one needs to add a column to a matrix as the first or the last column, here is more elegant method:
array = {{a, 1, 2}, {b, 2, 3}, {c, 3, 4}};
column = {x, y, z};
(* insert as the first column *)
Join[List /@ column, array, 2]
(* insert as the last column *)
Join[array, List /@ column, 2]
For other methods see the following MMa.SE thread and the threads referenced in it: