Why the out varies largely in fixed versus variable time step?

1 回表示 (過去 30 日間)
Anup
Anup 2022 年 12 月 21 日
編集済み: Davide Masiello 2022 年 12 月 21 日
I have a model as shown,
for fixed time step the output from the scope 1 is
for variable step, the output is
why there is so much of variation?

採用された回答

Davide Masiello
Davide Masiello 2022 年 12 月 21 日
編集済み: Davide Masiello 2022 年 12 月 21 日
That is because the fixed time step is not able to resolve the very steep change in the variable value that is clearly shown in the solution of the variable step setup.
You could actually obtain the same result with a fixed step by making the step size very small, but this would cause a much larger computation time.
Variable step is a far superior approach for this kind of problems.

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by