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: Nov. 27, 2018 See also iData, iFunc/fits, iFunc/plot, expon, sinedamp (c) E.Farhi, ILL. License: EUPL.