MATLAB How to export Matlab curve-fitted data to excel?

Click For Summary
To export MATLAB curve-fitted data to Excel, users can write the coefficients of the fitted function to a .csv file and then import that file into Excel. For a Gaussian fit, coefficients like a1, b1, and c1 are generated and can be copied into Excel. Users can then utilize these coefficients to create a formula in Excel, although familiarity with Excel functions may be necessary for implementation. Detailed guidance on how to format and use these coefficients in Excel is often requested. Properly exporting and utilizing the data allows for further analysis and visualization in Excel.
Si14
Messages
75
Reaction score
0
Hi all,

I have used MATLAB curve fit tool to curve-fit a set of x-y points. Now I want to export the curve-fitted y point to excel.

Any idea how to do this?

Thank you very much.
 
Physics news on Phys.org
write the coefficients to a .csv file and read them into excel
 
Dr Transport said:
write the coefficients to a .csv file and read them into excel

Thank you for your reply.
Could you explain more. Do you mean copy/paste the coeff of the resulted curve-fitted function to an excel file?
I am using a Gaussian fit. It gives me the Gaussian expression which is defined by about 24 coefficients and these coefficients are given separately below the expression. Something like this:

f(x) =
a1*exp(-((x-b1)/c1)^2) + a2*exp(-((x-b2)/c2)^2) +
...

and a1, b1, c1 and so on are defined below this expression.

So I wonder if I copy/paste these coefficients to excel, and also the formula, how can I use it as a function in excel. I am not very familiar with excel.

Thank you.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 18 ·
Replies
18
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
3
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K