I can't get the ilaplace of a function
27 views (last 30 days)
Show older comments
Hello every body, My problem is that I can't get the inverse laplace transform of a function. Is it that the function is too complicated? do I have to use an approximation of ilaplace rather than the ilaplace function that exists is matlab? or it's just something I did wrong? Here is the code: This the function I want to have the ilaplace for:
function y = Egs(s)
%constantes
a =14;
b=15;
c=25;
L=c-b;
r=c;
phi=15;
V=7.*7.*28;
ro=1000;
RHi=100;
RHb=50;
dRH = RHb-RHi;
nus=0.3;
d=1;
M=8.3.*10.^(-6);
k=1.7;
Es=200000;
nuc=0.2;
lambda=0.3;
tp=1;
nu = k.*(1-exp(-lambda.*tp));
%------------------------
D1 = s.*Epsa(s)-(s+lambda).*Epsa(s+lambda)/exp(lambda.*tp);
y = (1./k).*(a-b).*(a+b).*(Es./s).*D1.*s.*(b.^2.*(nuc-1)-c.^2.*(nuc+1))./(4.*b.^2.*(s.*Epsf(s)-(s+lambda).*Epsf(s+lambda))+(b-c).*(b+c).*D1.*((a.^2.*(nus+1)-b.^2.*(nus-1))));
Where Epsa is:
function y = Epsa(s)
syms t;
AUX = -16.7*10.^(-6)*t.^(0.3);
y = laplace(AUX,t,s);
and Epsf is
function y = Epsf(s)
%constantes
a = 14;
b=15;
c=25;
L=c-b;
r=c;
phi=15;
V=7.*7.*28;
ro=1000;
RHi=100;
RHb=50;
dRH = RHb-RHi;
nus=0.3;
D=1;
M=8.3.*10.^(-6);
k=1.7;
Es=200000;
nuc=0.2;
lambda=0.3;
tp=1;
nu = k.*(1-exp(-lambda.*tp));
%-------------
%RH(c,s)
%Bi
B1 = b.*sqrt(s)./sqrt(D);
B2 = c.*sqrt(s)./sqrt(D);
B3 = r.*sqrt(s)./sqrt(D);
B4 = -b.*exp(B2).*(b-r).*(b+r).*RHi.*sqrt(s)-3.*c.*exp(B2).*(b-r).*(b+r).*sqrt(s);
B5 = D.^(7./4).*sqrt(pi).*dRH.*(3.*sqrt(D)-2.*b.*sqrt(s)).*sqrt(-s./D).*(test(sqrt(b).*(s./D).^(1./4))-test(sqrt(r).*(s./D).^(1./4)))./(b.^(3./2).*s.^(9./4));
RH= sqrt(D).*exp(-c.*sqrt(s)./sqrt(D)).*(-b.*c.*s./D).^(3./2).*((D).^(3./2).*sqrt(-b.*c.*s./D).*(-6.*c.^(3./2).*(sqrt(6.*D).*exp(B1)-exp(B3).*sqrt(D.*r)).*dRH-B4)./(b.^2.*c.^2.*s.^2)+B5)./(2.*(3.*c+b).*s.^(3./2));
y = -1.1.*M.*((c.^2-b.^2).*RHi./(2.*s)-RH);
and here is the function I want to evaluate and plot :
function y = Eg(t)
syms s;
y = ilaplace(Egs(s),s,t);
However when I want to have Eg(1) it gives me this : ilaplace(....,s,1) I tried eval, simplify..but it doesn't work... therefore I can't plot Eg(t) :s well, I hope I'll get the answer. Thank you :)
0 Comments
Answers (1)
Paulo Silva
on 6 Jul 2011
The documentation for the ilaplace says that ilaplace(L) computes the inverse Laplace transform of the symbolic expression L, on your code you give a function handle to ilaplace and that won't work.
2 Comments
Paulo Silva
on 6 Jul 2011
sorry my mistake it's really symbolic
f=@(s) 1/s
syms s
ilaplace(f(s))
ans=1 has expected
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!