Hi,
I am using fzero to emulate the "events" options when solving a ODE system.
The function in the 3.2.2 of octave had no problems working with this code

IC = <inital conditions>
dynsys=@(x,t) xprime(x,t);
func=@(T) lsode(dynsys,IC,T);
t=fzero(@(x)event(x,func,1e-2),0)

where event is

function d=event(x,func,tol)

     T=linspace(0,x,1000);
     sol=func(T);
     d=abs(sol(end))-tol;

(Is there a better way of doing this?) Anyway, I changed to the fzero
that comes with optim-1.0.6 and modify a line in my code to

 t=fzero(@(x)event(x,func,1e-2),[0 60])

and now I get this error
 LSODE--  REPEATED CALLS WITH ISTATE = 1 AND TOUT = T (=R1)
      In above message,  R1 =  0.0000000000000E+00
 LSODE--  RUN ABORTED.. APPARENT INFINITE LOOP
error: exception encountered in Fortran subroutine dlsode_

Can I use the new fzero in this way or not?

Thanks

-- 
JuanPi
"Research begins with the unknown and ends with the unknowable."

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to