[scilab-Users] fitting ODE solution to experimental data

Peter Hinow hinow at uwm.edu
Thu Aug 18 00:47:39 CEST 2011


Dear Adrien,
yes, I made the objective function ... = sum((solution-data)^2). Basically, leastsq stops without any message but gives me only my initial guess back.
Many thanks,
     Peter

----- Original Message -----
From: "Adrien Vogt-Schilb" <vogt at centre-cired.fr>
To: users at lists.scilab.org
Sent: Wednesday, August 17, 2011 5:33:42 PM
Subject: Re: [scilab-Users] fitting ODE solution to experimental data

Hi 

The objective function should be a real number, I believe. 
If this si true, it should not have the same size than the data vector (it should be 1x1 real number) 

May be you could use a norm of the cost function you are currently using. Do that using scilab function norm. 

Hope it helps 

On 17/08/2011 17:09, Peter Hinow wrote: 

Dear fellows,

is there a "canonical" way to fit the solution of a parameter-dependent ordinary differential equation y' = f(y;p) to some experimental data? 

I have tried leastsq, but the optimal solution is always the initial guess, regardless of the initial guess. Specifically, I'm not able to get any information why leastsq terminates, even when I add the option "imp=2" (the "optimal" gradient has an entry of order 10^21). When I try datafit instead, I get an error like

Submatrix incorrectly defined.
at line      26 of function costf called by :  
at line     174 of function datafit called by :  

even though the output of the objective function has the same size as the data vector.

Thank you very much for your help,
     Peter 


-- 


Adrien Vogt-Schilb 
Research Fellow 
vogt at centre-cired.fr 
Tel: (+33) 1 43 94 73 96 
Fax: (+33) 1 43 94 73 70 

	

CIRED	

45 bis, Av de la Belle Gabrielle 
F-94736 Nogent-sur-Marne 
http://www.centre-cired.fr/ 

-- 
Peter Hinow, PhD
Department of Mathematical Sciences
University of Wisconsin - Milwaukee
P.O. Box 413
Milwaukee, WI 53201-0413
USA
phone: ++1 414 229 4933
https://pantherfile.uwm.edu/hinow/www/



More information about the users mailing list