How to enter a sigmoidal equation for a curve fit with lsqfitting
5 次查看(过去 30 天)
显示 更早的评论
he tratado de ingresar esta ecuación sigmoidal para un ajunste de curva lsqcurvefit con esta ecuación
y=1/(1+exp(4a(b-X)+2))
fun=@(x,xdata)1./(1+exp(4.*x(1).*(x(2) - xdata)+2))
x=lsqcurvefit(fun,x0,xdata,ydata)
he podido leer los datos aunque no he podido hacer los ajustes, al parecer reconoce al exponecial pero no los ajuste con X(1) y x(2).
alquien me podra ayudar con este tema
3 个评论
Matt J
2023-12-10
You haven't provided the data we would need to run the code. Most likely, though, the problem is your x0 has been chosen randomly (and therefore, poorly).
采纳的回答
Image Analyst
2023-12-9
See my attached demo where I fit data to the rate equation (a sigmoid type of formula).

Adapt as needed, like using a different sigmoid formula. If you have problems, write back and attach your data and m-file.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!