Exponential fit

Hello,

I'm new to Igor, and I'd like to fit an exponential such as the black curve on the attached image. The data to be fitted is in red.
So far I have managed to use the multi-peak fitting function and the curve fitting.

Thanks in advance for your help.

Best Regards
Go to the following menu:

Analysis: Curve Fitting

You will get a window. On the panel of "Function and Data", there is an option to make "New Fit Function". You can start from there to define your equation. There is also a "help" button. You can learn how to fit a curve from there.

Good luck,

Yaohua
gzvitiello wrote:
I'm new to Igor, and I'd like to fit an exponential such as the black curve on the attached image. The data to be fitted is in red.
So far I have managed to use the multi-peak fitting function and the curve fitting.

If you're using Multi-peak Fit, I presume you have more than one such peak in your data that you want to fit with that peak shape. Is that right?

The peak shape really doesn't fit that data well- are you sure you want that shape?

The peak shape is a two-sided exponential peak. We don't included that in Multi-peak Fit as shipped, but it can be added with some effort. First you would need to come up with a good user-defined fit function that implements that shape. Do you have an equation? Perhaps Y = exp(-abs(x-x0)/tau)? That would be like this:
Function twosidedExp(w,x) : FitFunc
    Wave w
    Variable x

    //CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will
    //CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog.
    //CurveFitDialog/ Equation:
    //CurveFitDialog/ f(x) = y0 + A*exp(-abs(x-x0)/tau)
    //CurveFitDialog/ End of Equation
    //CurveFitDialog/ Independent Variables 1
    //CurveFitDialog/ x
    //CurveFitDialog/ Coefficients 4
    //CurveFitDialog/ w[0] = y0
    //CurveFitDialog/ w[1] = A
    //CurveFitDialog/ w[2] = x0
    //CurveFitDialog/ w[3] = tau

    return w[0] + w[1]*exp(-abs(x-w[2])/w[3])
End

If you copy that code into your Procedure window, you can select "twosidedExp" as the fit function in the Curve Fit dialog. It is suitable for fitting a single two-sided exponential peak, but not yet suitable for Multipeak Fit.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Thank for your help, sorry that took me so long to answer the topic. I'll try out the suggestions.
Best Regards