comparison src/DLD-FUNCTIONS/lsode.cc @ 3997:d4091aff6468

[project @ 2002-07-17 18:00:06 by jwe]
author jwe
date Wed, 17 Jul 2002 18:00:07 +0000
parents 48d2bc4a3729
children f6df65db67f9
comparison
equal deleted inserted replaced
3996:98107d72871c 3997:d4091aff6468
287 else 287 else
288 output = ode.integrate (out_times); 288 output = ode.integrate (out_times);
289 289
290 if (! error_state) 290 if (! error_state)
291 { 291 {
292 retval(2) = ode.error_message (); 292 std::string msg = ode.error_message ();
293
294 retval(2) = msg;
293 retval(1) = static_cast<double> (ode.integration_state ()); 295 retval(1) = static_cast<double> (ode.integration_state ());
294 296
295 if (ode.integration_ok ()) 297 if (ode.integration_ok ())
296 retval(0) = output; 298 retval(0) = output;
297 else 299 else
298 { 300 {
299 retval(0) = Matrix (); 301 retval(0) = Matrix ();
300 302
301 if (nargout < 2) 303 if (nargout < 2)
302 { 304 error ("lsode: %s", msg.c_str ());
303 std::string msg = ode.error_message ();
304 error ("lsode: %s", msg.c_str ());
305 }
306 } 305 }
307 } 306 }
308 } 307 }
309 else 308 else
310 print_usage ("lsode"); 309 print_usage ("lsode");