フィルターのクリア

how to lapace results

1 回表示 (過去 30 日間)
Brenda Galabe
Brenda Galabe 2018 年 12 月 13 日
コメント済み: Brenda Galabe 2018 年 12 月 13 日
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 Center および File ExchangeNumber Theory についてさらに検索

製品


リリース

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by