How to export Matlab curve-fitted data to excel?

  • Context: MATLAB 
  • Thread starter Thread starter Si14
  • Start date Start date
  • Tags Tags
    Data Excel Matlab
Click For Summary
SUMMARY

The discussion focuses on exporting curve-fitted data from MATLAB to Excel, specifically using the MATLAB curve fitting tool to obtain coefficients from a Gaussian fit. Users are advised to write the coefficients to a .csv file, which can then be imported into Excel. The coefficients, which include parameters like a1, b1, and c1, can be copied into Excel, but users need guidance on how to utilize these coefficients as a function within Excel.

PREREQUISITES
  • Familiarity with MATLAB curve fitting tools
  • Understanding of Gaussian functions and their coefficients
  • Basic knowledge of CSV file formats
  • Introductory skills in Microsoft Excel
NEXT STEPS
  • Learn how to export data from MATLAB to CSV files
  • Research how to implement mathematical functions in Excel using coefficients
  • Explore advanced Excel functions for data analysis
  • Study MATLAB's curve fitting toolbox documentation for detailed usage
USEFUL FOR

This discussion is beneficial for data analysts, researchers, and engineers who utilize MATLAB for curve fitting and need to transfer data to Excel for further analysis or presentation.

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 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K
  • · 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
4K
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
1K