How to include a filtered signal in ODE 45 solver

3 ビュー (過去 30 日間)
Arjun Iyer
Arjun Iyer 2016 年 2 月 4 日
回答済み: Naty S 2016 年 2 月 4 日
Hey, I am trying a solve a set of coupled differential equations. I am supposed to analyze the problem for various modulating input, which in itself is not that difficult at all. I would just simply include a sin(t) function wherever appropriate to that. I went on to do the same thing by replacing my input with a square wave. The ODE45 solver seems to be really bad at the sudden jumps, so I wish to input a filtered version, or a smoothed version of square wave as the input. I dont understand how to include that in the function handle, since any filter in matlab acts on a time series and I do not a time series unless I solve the differential equation. Any help/ suggestions along this line would be very helpful.
  1 件のコメント
Arjun Iyer
Arjun Iyer 2016 年 2 月 4 日
I was thinking something simple like a bessel filtered square wave as the input.

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

回答 (1 件)

Naty S
Naty S 2016 年 2 月 4 日
Just a thought but you could smooth how ever you like prior to the ODE and create a lookup table to replace the square function with the smoothed wave, you could probably approximate the square function with a different function as well again prior to the ODE.

カテゴリ

Help Center および File ExchangeMathematics and Optimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by