# Change data form Table to Array

Ok, I am trying to figure out how exactly to change the data from Table such as

ptopp = Transpose[{pressure[[All, 1]], pressure[[All, 2]]}]
(* {{0., 59.5}, {0.1, 30.7}, {0.2,
21.1}, {0.3, -7.73}, {0.4, -17.3}, {1., -36.6}, {5., -75.}, {8., \
-104.}, {10., -123.}, {15., -94.2}, {20., -65.4}, {35., -36.6}, {65., \
-7.73}, {100., 1.87}} *)


into an Array. And I want to do that because I have to fit some function to that and I think it might be the best idea to use ListInterpolation which requires Array. There is something written about including the x component into the Array here: https://reference.wolfram.com/language/ref/ListInterpolation.html but I don't really understand how to convert it from a table to the desired form. Could semobody help?

• Welcome to Mathematica.SE! I suggest the following: 0) Browse the common pitfalls question 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Commented Jul 15, 2015 at 8:48

The second argument to ListInterpolation can either be a range of x-values (assumed to be equally spaced) or a list of x-values corresponding to the list values. So in your case you may simply do

ListInterpolation[ pressure[[All,2]] , pressure[[All,1]] ]


Or simply use

Interpolation[ptopp]


for the same result, or

InterpolatingPolynomial[ptopp,x]


if you want a polynomial instead of an InterpolatingFunction