Home > Scripts > Models > twoexp.m

iFit/twoexp

PURPOSE ^

signal = twoexp(p, x, {signal}) : two exponential decay functions

SYNOPSIS ^

function y=twoexp(varargin)

DESCRIPTION ^

 signal = twoexp(p, x, {signal}) : two exponential decay functions

   iFunc/twoexp two exponential decay functions (fit 1D function/model)
     y=p(1)*exp(-x/p(2))+p(3)*exp(-x/p(4)) + p(5);

 twoexp([tau1 tau2])    creates a model with specified decay constants
 twoexp([ parameters ]) creates a model with specified model parameters

 input:  p: twoexp model parameters (double)
            p = [   'Amplitude1' 'Tau1' 'Amplitude2' 'Tau2' 'Background' ] as a numerical array
          or 'guess'
         x: axis (double)
         y: when values are given and p='guess', a guess of the parameters is performed (double)
 output: y: model value
 ex:     signal=twoexp([1 0 1 1], -10:10); or plot(twoexp)

 Version: Mar. 22, 2017
 See also iData, iFunc/fits, iFunc/plot, expon, sinedamp
 (c) E.Farhi, ILL. License: EUPL.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 22-Mar-2017 09:13:30 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1