using cfit objects with an optimization routine
2 views (last 30 days)
Show older comments
I've got a cfit object from the curvefitting toolbox and I want to use it in an optimization loop. I want to change the values of the coeffs in each optimization loop until it matches the desired output. (i've got the optimization bit sorted it's just the cfit that's causing me problems)
My idea was to deconstruct the cfit with
f = formula(cfit); c = coeffvalues(cfit)
- change the coeffvalues - and then put it back together with
fittedmodel = cfit(f,c).
I could then use the
y=fittedmodel(x)
syntax to evaluate the function.
Sadly I can't get this to work - anyone have any ideas?
thanks.
0 Comments
Answers (0)
See Also
Categories
Find more on Get Started with Optimization Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!