slow ilapalce calculation for systems with higher polynomial orders

7 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by