finding laplace transform of heaviside function
12 次查看(过去 30 天)
显示 更早的评论
trying to get lapace and plot :
θ” + 2θ′ + 6θ = [H(t) − H(t − 1)],
θ(0) = 4, θ′ (0) = 5,
H is the Heaviside function defined by
H(t) = { 0, x < 0, 1, x ≥ 0.
Find and sketch θ(t).
my code : error with dsolve
laplace('heaviside(t)-heaviside(t-1)',t,s)
syms t theta gensoln initsoln
eq = 'D2theta + 2*Dtheta + 6*theta -heaviside(t)+heaviside(t-1)'
initsoln = dsolve(deq,'theta(0)=6, Dtheta(0)=6', 't')
pretty(initsoln)
回答(1 个)
Walter Roberson
2018-12-13
sympref('HeavisideAtOrigin',1); %needs R2015a or later
syms s t
expr1 = heaviside(t)-heaviside(t-1);
expr2 = laplace(expr1, t, s) %not sure why we are doing this ??
syms theta(t)
Dtheta = diff(theta);
D2theta = diff(Dtheta);
deq = D2theta + 2*Dtheta + 6*theta == expr1;
initsoln = simplify( dsolve(deq, theta(0)==6, Dtheta(0)==6, t) )
Not sure what this has to do with laplace ?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!