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!

  • $\begingroup$ The first example in the Fit documentation is really good and matches your data perfectly. $\endgroup$ – JimB Mar 12 '18 at 23:50
  • $\begingroup$ 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. $\endgroup$ – george2079 Mar 13 '18 at 0:16
  • $\begingroup$ I have n{x,y} couples $\endgroup$ – kfrd kfrd Mar 13 '18 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.