Do sfit and cfit objects carry the input x,y,z data? If not, why do they consume so much memory?
Show older comments
Attached is an sfit obejct from a poly33 fit, generated with the cftool app. I am wondering why it consumes so much memory (3.3MB) considering that it only contains 10 coefficients, some formula text, and perhaps an additional 20 values for the confidence bounds. Does the sfit object contain the original x,y,z data used to generate the fit? That might account for the additional memory, but if so, is there a way to retrieve that data from the object?
load fittedmodel
fittedmodel
whos fittedmodel
Accepted Answer
More Answers (1)
Avadhoot
on 21 Nov 2023
Hi Matt,
I understand that you have created a “sfit” object using the “cftool” app. The object is created by the name, “fittedmodel”. As you have mentioned correctly, the large size of “fittedmodel” is due to the fact that it stores the original fitting data as the variables “x”,”y” and “z”. You can access all the attributes of the “fittedmodel” object by first loading the object into your base workspace as follows:
load fittedmodel
After executing this command, you will see all the variables defined in the "fittedmodel.mat" file in your workspace. You can access them directly from the base workspace itself.
Refer to the below documentation for more information on “sfit” objects:
I hope it helps.
1 Comment
Categories
Find more on Extend Testing Frameworks 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!