Rank: 82747 based on 0 downloads (last 30 days) and 0 file submitted
Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Matthias View all
Updated File Comments Rating
12 Oct 2010 unique_no_sort Like unique.m but without sorting Author: Caitlin

thanks, saved me making my own script!

15 Jul 2010 EzyFit 2.42 A free curve fitting toolbox for Matlab Author: Frederic Moisy

You're a champion for creating this!
Thanks very much...

I do have a couple of questions I would like to ask:

When you say "There is no way for the moment to change this number of iterations in EzyFit", I am a bit confused by this. In fminsearch the default for 'MaxInter' and 'MaxFunEvals' are both '200*numberOfVariables'.

I have set these to 2000000*numberOfVariables but I still run into the exact same error when using:
ezfit(x,y, a1*exp(-b1*x)+a2*exp(-b2*x)+y0)

The error is:
Exiting: Maximum number of function evaluations has been exceeded
- increase MaxFunEvals option.
Current function value: 30502.906917

Also, since MaxInter and MaxfunEvals both must be integer values, I do not understand how the iteration above can have decimal values. Or maybe I am misinterpreting it?

The other thing I wanted to say is that if run fminsearch and call fitfun as per the code below, fminsearch is able to generate a perfect 3 exponent decay function in 175 iterations (i.e., much lower than 30502.906917). I should think ezfit should be able to achieve the exact same result if allowed to iterate within definable constraints (see TollX and TollFun below), because it also uses fminsearch.

Finally, probably a dumb question, how come 'showfit' will work when I supply a 3 (or 2) exponent function but ezfit fails with the above iteration error?

Looking forward to reading your answers......this is otherwise a brilliant toolbox.

Best regards,
Matthias

code:
-------
% Define initial paramters

t = x;
y = y;
% Grab x and y values generated in ginput

TolFun = .000000001;
TolX = 0.1;
% TolFun = Termination tolerance on the function value
% TolX = Termination tolerance on x

% Plot x and y

set(0,'DefaultFigureWindowStyle','docked')
figure;plot(t,y,'ro')
hold on
h = plot(t,y,'b');
hold off
title('Input data')
start = [0;0;0];
% Define starting lambdas (initial guesses)

outputFcn = @(x,optimvalues,state) fitoutputfun(x,optimvalues,state,t,y,h);
% User defined output function for each iteration of fminsearch

options = optimset('OutputFcn',outputFcn,'TolX',TolX,'TolFun',TolFun, 'Display', 'iter');
% Options for fminsearch

estimated_lambda = fminsearch(@(x)fitfun_v2(x,t,y),start,options);

14 Jul 2010 Exponential fit, without start-guess Fits 1) f=s1+s2*exp(-t/s3) or 2) f=s1+s2*exp(-t/s3)+s4*exp(-t/s5) to numerics, without startguess Author: Per Sundqvist

Hi thanks for supplying this script.

After reading the help file and trying to following the examples (only #2 seemed to work btw), my understanding how this script works is still a little vague. I have three questions:

1) What is the purpose of the variable 'tt' and how is it derived?

2) Why does the script only work when lsq_val is set to 'no'

3) What exactly are the parameters 's' returns - e.g., if I'm running a double exponent, does it return, in the following order:
A1*exp(-x/t1)+A2*exp(-x/t2)+y0
where:
A1 = first amplitude
t1 = first lifetime
A2 = second amplitude
t2 = second lifetime
yo = offset

Kind regards,
Matt

04 Feb 2010 CellSort Toolbox for automated sorting of cellular calcium signals from optical imaging data. Author: Eran Mukamel

The associated publication in Neuron 63, 747–760 makes this look promising. However, getting this to run based on the instructions provided in the supplementary publication is very trying for those with less than a mastery of Matlab.

Contact us