I am trying the find the inverse Laplace voltage of a circuit, but when I compute it MATLAB output contains sinh and cosh. Is there a way to make MATLAB compute it?
Here is my code:
syms s
F=((s^2) 12*s 20)/(s*((s^2) 10*s 4))
f=ilaplace(F)
f=vpa(f,5)
CodePudding user response:
The expression for f
contains the t
symbol, you have to substitute a value for t
before you can compute the output at that time t
; the error message directs you precisely to that solution. I chose t = 5
, you can change that as you wish.
syms s
F = (s^2 12*s 20) / (s*(s^2 10*s 4));
f = ilaplace(F);
% 5 - 4*exp(-5*t)*(cosh(21^(1/2)*t) (3*21^(1/2)*sinh(21^(1/2)*t))/14)
f = subs(f, 5);
double(f)
ans =
4.5083