フィルターのクリア

How to modify settings for event detection in MATLAB?

1 回表示 (過去 30 日間)
Sarah Ghosh
Sarah Ghosh 2013 年 6 月 28 日
I am writing a code for event detection. However, I want to increase the region of convergence from zero to about 1e-4.For example, instead of checking for y(1)-10=0, I want to check for y(1)-10<1e-4. How can this be done?
  2 件のコメント
Walter Roberson
Walter Roberson 2013 年 6 月 28 日
Are you referring to event detection in the context of one of the ode*() routines?
Sarah Ghosh
Sarah Ghosh 2013 年 6 月 28 日
Yes, it comes with the options parameter of ode*

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2013 年 6 月 28 日
Return
y(1)-10 >= 1e-4
This will be false (0) when it is within 1e-4. Set the options so the crossing direction does not matter.
  3 件のコメント
Walter Roberson
Walter Roberson 2013 年 7 月 1 日
Return
double(y(1)-10 >= 1e-4)
Sarah Ghosh
Sarah Ghosh 2013 年 7 月 1 日
Yes, it worked.... thanks a lot for the help....

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by