Effacer les filtres
Effacer les filtres

Fitting parameter to a dataset

2 vues (au cours des 30 derniers jours)
CVR
CVR le 12 Sep 2013
Hi there, if I have a dataset x, and I want to fit to a function y, which is
y = exp((x - c)), when a<x<b
y = sin(dx), when x >=b ,
here the parameter is a, b, c, and d. Can I do this using fmincon in matlab ?

Réponse acceptée

laurie
laurie le 12 Sep 2013
i would fit the two portions of the curve separately since the parameters for both portions (c and d) are independent.
there is the excellent free toolbox EZYFIT than fits data to a formula, it is pretty easy to use (even i managed to use it - after failing miserably at writing my own code with fminsearch) and it can be found here: http://www.fast.u-psud.fr/ezyfit/ or here: http://www.mathworks.com/matlabcentral/fileexchange/10176-ezyfit-2-41
it actually uses fminsearch, not fmincon (don't ask me why..)

Plus de réponses (0)

Catégories

En savoir plus sur Interpolation dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by