I have two scripts for fitting a function. The fitting results are the same for both of the scripts, but plotting the fit results is producing different plots.
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Manvendra Sharma
le 14 Sep 2016
Commenté : Manvendra Sharma
le 14 Sep 2016
I have two attached scripts creatFit.m and expfit_mine. I am fitting same data with same lower and upper bounds with same starting points. The fitresults are giving the same values for parameters, but while I am plotting they are producing different plots. createFit was generated by matlab and I made the expfit_mine.
Regards, Manvendra
2 commentaires
John D'Errico
le 14 Sep 2016
That would be ok, but you have not actually attached any scripts. Try harder.
Réponse acceptée
dbmn
le 14 Sep 2016
change the last line of expfit_mine.m to
plot(xData,yData,'b.',times,fun(fitresult,times),'r-')
and you should be fine
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!