Borrar filtros
Borrar filtros

Why do I get an "odezero: an event disappeared (internal error)" error when using an ODE events function in MATLAB 7.4 (R2007a)?

31 visualizaciones (últimos 30 días)
I am trying to use an events function to in my ODE function. However, when I run the attached file 'ode_events_error.m' I am getting the following error message:
??? Error using ==> funfun\private\odezero at 50
odezero: an event disappeared (internal error)
Error in ==> ode45 at 419
[te,ye,ie,valt,stop] = ...
Error in ==> mycode at 10
[r,state,re,statee,ie] = ode45(@(r,state)prbode(r,state,tauc),rspan,stateinit,options);

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 27 de Jun. de 2009
This is a zero-crossing events error. The events locator is incapable of capturing a zero crossing for complex signals.
You can see this by adding the following code to the 'events' subfunction in 'ODE_events_error.m'function:
if ~isreal(state(2))
error('Imaginary Events signal (%g +i%g) at r=%.16f.',real(state(2)),imag(state(2)),r)
end
You will see that during the simulation the value state(2) becomes complex, and the following error message is returned:
??? Error using ==> mycode>events at 37
Imaginary Events signal (4.02767e-009 +i7.46735e-027) at r=2.7392559940601449.

Más respuestas (0)

Categorías

Más información sobre Signal Generation and Preprocessing en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2007a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by