フィルターのクリア

slow ilapalce calculation for systems with higher polynomial orders

7 ビュー (過去 30 日間)
S H
S H 2019 年 2 月 6 日
コメント済み: S H 2019 年 2 月 6 日
Is it possible to calculate the output o(t) of a system h(s) for the input x(s) faster than following codes? Why the following codes run extremely slow? What is wrong?
syms s t
time=linspace(0,4/1e09,401);
h=((5034923382327397*s^3)/627710173538668076383578942320766641610235544446403451289600 + (6766076405664713*s^2)/71362384635297994052914298472474756819137331200 + (210759975314673*s)/64903710731685345356631204115251200 + 376686340223973/281474976710656000000000000)/((5034923382327397*s^3)/12554203470773361527671578846415332832204710888928069025792 + (2284590225627523*s^2)/356811923176489970264571492362373784095686656 + (7512718920571563*s)/649037107316853453566312041152512 + 765850114395651/37778931862957161709568);
x=(100e-03/s)*(1-exp(-s/(2*1e09)))/(1+exp(-s/(2*1e09)));
y=ilaplace(x*h,s,t);
o=subs(y,t,time);
plot(time,o)
  2 件のコメント
Walter Roberson
Walter Roberson 2019 年 2 月 6 日
your expression for h is either incorrect or meaningless. Numbers with that many digits will be approximated with floating point which will introduce false behaviour with roots and poles in different places than you expect .
Chances are high that you should be using symbolic constants not floating point .
sym('26271892563873553613')
S H
S H 2019 年 2 月 6 日
Thank you Walter. Your suggestion improved my codes but still ilaplace doesn't work. I will open a new thred by resubmitting my revised question.

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

採用された回答

Walter Roberson
Walter Roberson 2019 年 2 月 6 日
subs(vpa(y,16),t,time)
No point in calculating with large numbers to indefinite precision only to throw away that precision since plot() only has single precision resolution according to some tests I have done.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by