Fitting Data Imported into Mathematica from Excel

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
tjw137
Messages
4
Reaction score
0
Can you fit data that is imported into Mathematica 8? I am just using the Import command, and I cannot figure out how to work with this data. I would really like to fit my curve. This is the code I used to import the data: Import[datafile.xlsx"]
 
Physics news on Phys.org
If your Excel sheet is big then make up a smaller example sheet, something with perhaps half a dozen rows should be enough to show what it is you want to fit.

Then in Mathematica do the Import.

Select the In[1]:= and Out[1]= cells by clicking on the thin little cell bracket along the far right edge of the notebook. Copy that to the clipboard. Paste that into a reply here.

Then add a bit of text at the bottom of that reply explaining what kind of function you want to Fit to this, a straight line?, a parabola?, some fairly specific simple concrete function you want to fit.

With that it should be fairly simple for someone to take a moment and show you a line or two of code to do what you want.