Clear Filters
Clear Filters

Double sigmoid fit

5 views (last 30 days)
Stefan
Stefan on 10 May 2011
Hi, I have bell-shaped data that I'd like to fit. Publications with related data use a "fit to the Boltzman equation." I imagine that this means a double sigmoid fit.
The curve fitting tool does not have a related option, any ideas would be greatly appreciated.
Thanks! Stefan
  3 Comments
Stefan
Stefan on 10 May 2011
Thanks for the tip. I was looking at that thread before I posted; unfortunately, I'm not able to move forward from the answers on that page.
One of the replies states that "the cftool GUI or the fit function should be able to do this. Also the nlinfit function in the Statistics Toolbox, the lsqcurvefit function in the Optimization Toolbox, and others." But it doesn't say how to do use these tools to achieve a sigmoid fit.
For example, the reply states that the cftool should be able to, however there is no sigmoid option in curve fit.
Andrew Newell
Andrew Newell on 11 May 2011
See also http://www.mathworks.com/help/toolbox/stats/bq_676m-2.html#bq_676m-39.

Sign in to comment.

Accepted Answer

Andrew Newell
Andrew Newell on 11 May 2011
Here is an example of how you could use cfittool to create a sigmoid fit. First, enter these commands in the Command Window.
x = -5:.05:5;
y = tanh(x);
cfittool
In the Curve Fitting Tool, do the following:
  1. Click on the Data... button and import x and y.
  2. Click on Fitting... and then New fit.
  3. Under Type of fit, choose CustomEquations.
  4. In the New Custom Equation window, click on GeneralEquations.
  5. In the Equation: line after the = sign, type in a*exp(-b*x)+c, and click OK.
  6. Finally, click Apply to see a nicefit.

More Answers (0)

Categories

Find more on Get Started with Curve Fitting Toolbox 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!