How to get/save Curve Fitted Model data into Workspace with .mat file ?
20 views (last 30 days)
Show older comments
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 !!
0 Comments
Accepted Answer
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)
See Also
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!