Hello, I think, in the following example the NonNegative option is ignored during integration, because Y contains negative values.
I would be glad if somebody could confirm this or provide me with an explanation. Best regards, Simon Y0 = [2.4088e+11, 0, 0] TSPAN = [0.0, 24.0]; vopt = odeset ('NonNegative', [1,2,3]); [T,Y] = ode45(@ODEs, TSPAN, Y0, vopt); function yprime = ODEs(T,Y) # constants a = 4.0 * 10-6; b = 2.1 * 10-12; c = 2.5 * 105; d = 1.0 * 10-5; e = 6.5 * 10-2; f = e /100; g = 7.2 * 10-3; # first-order-ODEs yprime = [ - d * Y(1) * c; d * Y(1) * a / b ... + f * Y(3) ... - e * Y(2); e * Y(2) ... - f * Y(3) ... - g * Y(3); ]; endfunction ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev