how to lapace results

1 次查看(过去 30 天)
how to plot this please
deqdiff = 'diff(y(t),t,t) + y(t) - cos(t)'
ldeqdiff = laplace(deqdiff,t,s)
sldeqdiff = subs(ldeqdiff,{'D(y)(0)','y(0)'},{1,1})
syms Ys
ldeqinit = subs(sldeqdiff,'laplace(y(t),t,s)',Ys)
ly = solve(ldeqinit,Ys)
ilaplace(ly,s,t)

采纳的回答

Walter Roberson
Walter Roberson 2018-12-13
syms s t y(t)
Dy = diff(y);
deqdiff = diff(y(t),t,t) + y(t) - cos(t);
ldeqdiff = laplace(deqdiff,t,s);
sldeqdiff = subs(ldeqdiff,{Dy(0), y(0)},{1,1});
syms Ys
Lyt = laplace(y(t), t, s);
ldeqinit = subs(sldeqdiff, Lyt, Ys);
ly = solve(ldeqinit,Ys);
ily = ilaplace(ly,s,t);
fplot(ily, [0 20])
  4 个评论
Walter Roberson
Walter Roberson 2018-12-13
You are using the transition release, when fplot had been introduced but did not yet support symbolic expressions.
Replace
fplot(ily,[0 20])
with
Fily = matlabFunction(ily);
fplot(Fily, [0 20])
.... And laplace still is not documented in your release (or any other release) as accepting a character vector. You need to start using documented behaviour or else we are going to start telling you to work things out by yourself since you are relying on undocumented behaviour.
Brenda Galabe
Brenda Galabe 2018-12-13
thank you that worked

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Number Theory 的更多信息

产品


版本

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by