ilaplace and laplace answer
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
justin nabbs
am 2 Apr. 2015
Bearbeitet: Walter Roberson
am 25 Nov. 2024 um 3:50
I am just learning how to use the Laplace/Inverse functions in Matlab and was hoping to get some understanding of the final answer below. When working out 1st and second order functions I can ascertain the answer as it does not contain symsum or rootof, or r4 etc. In any case I am unsure of what symsum and Rootof translates to for a final answer? Thanks
>> syms t s
>> F=5*(s+3)/((s^5+4*s^4-3*s^2+7*s+10))
F =
(5*s + 15)/(s^5 + 4*s^4 - 3*s^2 + 7*s + 10)
>> pretty(ans)
5 s + 15
---------------------------
5 4 2
s + 4 s - 3 s + 7 s + 10
>> ilaplace(F)
ans =
15*symsum(exp(r4*t)/(5*r4^4 + 16*r4^3 - 6*r4 + 7), r4 in RootOf(s4^5 + 4*s4^4 - 3*s4^2 + 7*s4 + 10, s4)) + 5*symsum((r4*exp(r4*t))/(5*r4^4 + 16*r4^3 - 6*r4 + 7), r4 in RootOf(s4^5 + 4*s4^4 - 3*s4^2 + 7*s4 + 10, s4))
>>
0 Kommentare
Akzeptierte Antwort
Star Strider
am 2 Apr. 2015
Bearbeitet: Star Strider
am 2 Apr. 2015
If you have R2015a, you can invert it the old-fashion way with partfrac. Do a pratial fraction expansion and then invert it:
syms t s
Fsv=5*(s+3)/((s^5+4*s^4-3*s^2+7*s+10));
Fpf = partfrac(Fsv, s, 'FactorMode','real');
Ft = ilaplace(Fpf, s, t);
Ftv = vpa(Ft,5)
producing:
Ftv =
- exp(t*(0.97907 + 0.92185i))*(0.29419 + 0.30855i) - exp(t*(0.97907 - 0.92185i))*(0.29419 - 0.30855i) + exp(t*(- 1.1315 + 0.46501i))*(0.30547 - 0.6614i) + exp(t*(- 1.1315 - 0.46501i))*(0.30547 + 0.6614i) - 0.022557*exp(-3.6952*t)
I used vpa to make it easy to read. MATLAB maintains full precision.
Added —
This can be simplified further with rewrite and simplify:
Ftt = rewrite(Ftv, 'sincos');
Ftt = simplify(Ftt, 'Steps',10, 'IgnoreAnalyticConstraints',1);
Ftt = vpa(Ftt,5)
producing a much neater result:
Ftt =
1.3228*exp(-1.1315*t)*sin(0.46501*t) - 0.022557*exp(-3.6952*t) + 0.61094*exp(-1.1315*t)*cos(0.46501*t)
1 Kommentar
Duc Huy Le
am 16 Jun. 2015
Bearbeitet: Walter Roberson
am 25 Nov. 2024 um 3:50
Thanks, i have used tutorial but but results return a virtual:
syms t s
M=(40000/s+240)*(exp(-0.0936*s)-exp(-1.008*s));
N=(32000/s+240)*(exp(-0.2808*s)-exp(-0.288*s));
Q1=2000*s^2+2400*s+360000;
Q2=-120*s+34000;
Q3=120*s-34000;
Q4=2100*s^2+4062*s+604100;
F=((M+N)*Q4+(1.35*N-1.25*M)*Q2)/(Q1*Q4+Q2*Q3);
Fpf = partfrac(F, s, 'FactorMode','real');
Ft = ilaplace(Fpf, s, t);
Ftv = vpa(Ft,5);
Ftt = rewrite(Ftv, 'sincos');
Ftt = simplify(Ftt, 'Steps',10, 'IgnoreAnalyticConstraints',1);
Ftt = vpa(Ftt,5)
Ftt =
0.10385*heaviside(1.0*t - 0.0936) - 0.096154*heaviside(1.0*t - 0.288) + 0.096154*heaviside(1.0*t - 0.2808) - 0.10385*heaviside(1.0*t - 1.008) + sin(t*(17.006 - 0.95036i))*heaviside(1.0*t - 0.288)*(0.006097 + 0.0015722i) - sin(t*(17.006 - 0.95036i))*heaviside(1.0*t - 0.2808)*(0.0062008 + 0.00081025i) - sin(t*(17.006 - 0.95036i))*heaviside(1.0*t - 1.008)*(0.018259 - 0.000076573i) - cos(t*(13.31 - 0.61679i))*heaviside(1.0*t - 0.0936)*(0.01834 + 0.044105i) - sin(t*(13.31 - 0.61679i))*heaviside(1.0*t - 0.0936)*(0.044105 - 0.01834i) - cos(t*(13.31 - 0.61679i))*heaviside(1.0*t - 0.288)*(0.050133 + 0.03844i) + cos(t*(13.31 - 0.61679i))*heaviside(1.0*t - 0.2808)*(0.053344 + 0.033319i) + cos(t*(13.31 - 0.61679i))*heaviside(1.0*t - 1.008)*(0.059611 + 0.059122i) - sin(t*(13.31 - 0.61679i))*heaviside(1.0*t - 0.288)*(0.03844 - 0.050133i) + sin(t*(13.31 - 0.61679i))*heaviside(1.0*t - 0.2808)*(0.033319 - 0.053344i) + sin(t*(13.31 - 0.61679i))*heaviside(1.0*t - 1.008)*(0.059122 - 0.059611i) - heaviside(1.0*t - 0.0936)*cos(t*(13.31 + 0.61679i))*(0.01834 - 0.044105i) + heaviside(1.0*t - 0.0936)*cos(t*(17.006 + 0.95036i))*(0.001173 + 0.0075669i) - sin(t*(13.31 + 0.61679i))*heaviside(1.0*t - 0.0936)*(0.044105 + 0.01834i) + cos(t*(17.006 - 0.95036i))*heaviside(1.0*t - 0.0936)*(0.001173 - 0.0075669i) - sin(t*(17.006 + 0.95036i))*heaviside(1.0*t - 0.0936)*(0.0075669 - 0.001173i) - heaviside(1.0*t - 0.288)*cos(t*(13.31 + 0.61679i))*(0.050133 - 0.03844i) + heaviside(1.0*t - 0.2808)*cos(t*(13.31 + 0.61679i))*(0.053344 - 0.033319i) - heaviside(1.0*t - 0.288)*cos(t*(17.006 + 0.95036i))*(0.0015722 + 0.006097i) + heaviside(1.0*t - 0.2808)*cos(t*(17.006 + 0.95036i))*(0.00081025 + 0.0062008i) + heaviside(1.0*t - 1.008)*cos(t*(13.31 + 0.61679i))*(0.059611 - 0.059122i) - sin(t*(17.006 - 0.95036i))*heaviside(1.0*t - 0.0936)*(0.0075669 + 0.001173i) - heaviside(1.0*t - 1.008)*cos(t*(17.006 + 0.95036i))*(0.000076573 - 0.018259i) - sin(t*(13.31 + 0.61679i))*heaviside(1.0*t - 0.288)*(0.03844 + 0.050133i) - cos(t*(17.006 - 0.95036i))*heaviside(1.0*t - 0.288)*(0.0015722 - 0.006097i) + sin(t*(13.31 + 0.61679i))*heaviside(1.0*t - 0.2808)*(0.033319 + 0.053344i) + cos(t*(17.006 - 0.95036i))*heaviside(1.0*t - 0.2808)*(0.00081025 - 0.0062008i) + sin(t*(17.006 + 0.95036i))*heaviside(1.0*t - 0.288)*(0.006097 - 0.0015722i) - sin(t*(17.006 + 0.95036i))*heaviside(1.0*t - 0.2808)*(0.0062008 - 0.00081025i) + sin(t*(13.31 + 0.61679i))*heaviside(1.0*t - 1.008)*(0.059122 + 0.059611i) - cos(t*(17.006 - 0.95036i))*heaviside(1.0*t - 1.008)*(0.000076573 + 0.018259i) - sin(t*(17.006 + 0.95036i))*heaviside(1.0*t - 1.008)*(0.018259 + 0.000076573i)
I want to draw a graph of the function returns the final. Please help me. Thanks!
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Special Values finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!