export data from fitresult

24 views (last 30 days)
Cristina Totaro
Cristina Totaro on 29 Jan 2021
Answered: Jiarui Kang on 29 Jun 2022
Hi,
I am new on Matlab, I hope that someone can help me.
I have to make the fit of several files. I generated the code and I was able to perform the fit of all these files simultaneously.
My problem is to export the results of each fit as single txt files, because I have then to extract specific values of the function to perform other analyses.
I hope I have been clear enough.
Thank you.
Cristina
  2 Comments
Cristina Totaro
Cristina Totaro on 1 Feb 2021
Hi,
thank you very much for your reply.
Actually, I need to save only the values of the coefficients of the fuction (it is a poly3), not all the info, because I have to use these values to obtain some specific values of the fuction itself.
However, your suggestion is useful for another step of my process.
Thank you again.
Cristina

Sign in to comment.

Answers (1)

Jiarui Kang
Jiarui Kang on 29 Jun 2022
The data of a fitted curve can be extracted using feval function.
First right click on your fitted data in curve fitting tool box and save it in your workspace. Then use feval function to evaluate the value for inputs.
for example
x=[0:0.0005:0.16];
y=feval(fittedmodel,x);

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by