How to get/save Curve Fitted Model data into Workspace with .mat file ?

20 views (last 30 days)
Hello Everyone,
I used curve fitting toolbox in Matlab 2012b. I fitted the curve on my data with any model like Polynomial, Fourier or any. I want to save Polynomial, Fourier model data as .mat file for further processing.
I am new in this environment, help, suggestion and comments would be highly appreciation
Thanks in advance !!

Accepted Answer

Mischa Kim
Mischa Kim on 23 Mar 2014
Edited: Mischa Kim on 23 Mar 2014
Shara, you could simply use the save command:
x = 0:0.1:pi;
y = sin(x);
ft = fittype('poly4');
[fitresult, gof] = fit(x',y','poly4');
save('mymat.mat','fitresult','ft','gof','x','y')
Alternatively, if the variables are in the workspace, select them, and do a mouse right-click to save.
Retrieve the mat file using
load('mymat.mat')

More Answers (0)

Community Treasure Hunt

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

Start Hunting!