Solve for laplace transformed equation

I tried solve the equation which was laplace transformed.
But it is very simple to solve, It can't solve the equation. Because of the equation is explicit.
It can solve just move -5Y(s) term which is contained right side hand to left side hand and divide by s+5 to both side hands.
But matlab can't solve that.
I'm using ipad matlab. How can I solve this problem?

Answers (1)

syms y
solve(subs(eq, Y, y), y)

2 Comments

I think it just correct variable name.
First, Y(s) is originaly named laplace(y(t),t,s) by simply using laplace transformation function.
So I changed the name laplace(y(t),t,s) to Y.
I think this progress is same for your suggestion.
Either way, you progress by substituting a symbolic name that is not a function for the expression that you want to solve for, and then you solve() for that name.
If for some reason that is not acceptable, then you will need to drop into the symbolic engine:
>> syms Y(s); eq = s*Y(s) == 10/(s+10) - 5*Y(s); Ysol = feval(symengine, 'solve', eq, Y)
Ysol =
piecewise(s == -5, {}, s ~= -5, {10/((s + 5)*(s + 10))})
Note that this is not a normal piecewise(): this is the representation of an internal MuPAD object.

Sign in to comment.

Tags

Asked:

on 2 Jan 2020

Commented:

on 3 Jan 2020

Community Treasure Hunt

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

Start Hunting!