# Fitting data with two variables

I have a proble with Mathematica: I've imported data in the form: {{2.0,2.2},{4.0,4.2},{6.0,6.2},,...,{x,y}} from a file and I want to fit them (with a line o other function) but I don't know how to use Fit or FindFit function with two variables (I'd like the first component on the x axis and the second on the y one). Thank you for ypur help!

• The first example in the Fit documentation is really good and matches your data perfectly. – JimB Mar 12 '18 at 23:50
• its not clear from the description how your data is structured. Typically 2d data would be {{x1,y1,f[x1,y1]},{x2,y2,f[x2,y2]}, ...} (dimension 3xn). You show only a 2x3 array. – george2079 Mar 13 '18 at 0:16
• I have n{x,y} couples – kfrd kfrd Mar 13 '18 at 6:29