フィルターのクリア

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

31 ビュー (過去 30 日間)
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);

採用された回答

MathWorks Support Team
MathWorks Support Team 2009 年 6 月 27 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSignal Generation and Preprocessing についてさらに検索

タグ

タグが未入力です。

製品


リリース

R2007a

Community Treasure Hunt

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

Start Hunting!

Translated by