Mathematica Fitting Data Imported into Mathematica from Excel

AI Thread Summary
Data imported into Mathematica from Excel can indeed be fitted using the Import command, but users may encounter difficulties if the dataset is large. It is recommended to create a smaller example with a few rows to demonstrate the fitting process clearly. Users should share their import code and specify the type of function they wish to fit, such as a straight line or parabola. This information will enable others to provide targeted assistance with the appropriate code. Clear communication of the desired fitting function is essential for effective support.
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.
 

Similar threads

Back
Top