Numerical Laplace Transform

Often times, we are faced with the need to compute the laplace ransfrom of complex function.
600 Downloads
Aktualisiert 20. Dez 2016

Lizenz anzeigen

% Example 1
f1 = @(t) t.^2;
Lapf1 = @(s) LapTrans(f1,s);
sc = 1:0.1:10;
sp = 1:10;
yc = 2./sc.^3;
yp = arrayfun(Lapf1, sp);
figure(1)
plot(sc,yc,'r',sp,yp,'*');
legend('Exact Transformation', 'Approximate Transformation');
title('Numerical Laplace Transform (t^2)')

% Example 2

f1 = @(t) sin(t);
Lapf1 = @(s) LapTrans(f1,s);
sc = 1:0.1:10;
sp = 1:10;
yc = 1./(1 + sc.^2);
yp = arrayfun(Lapf1, sp);
figure(2)
plot(sc,yc,'r',sp,yp,'*');
legend('Exact Transformation', 'Approximate Transformation');
title('Numerical Laplace Transform (sin(t))')

% Example 3

f1 = @(t) besselj(0, t);
Lapf1 = @(s) LapTrans(f1,s);
sc = 1:0.1:10;
sp = 1:10;
yc = 1./sqrt(1 + sc.^2);
yp = arrayfun(Lapf1, sp);
figure(3)
plot(sc,yc,'r',sp,yp,'*');
legend('Exact Transformation', 'Approximate Transformation');
title('Numerical Laplace Transform (besselj(0, t))')

% Example 4
n = 0.358;
f1 = @(t) besselk(n, t);
Lapf1 = @(s) LapTrans(f1,s);
sc = 1:0.1:10;
sp = 1:10;
c = sqrt(-1 + sc.^2);
yc = (pi * (sc + c).^(-n).*(-1 + (sc + c).^(2*n)))./(2*c*sin(n*pi));
yp = arrayfun(Lapf1, sp);
figure(4)
plot(sc,yc,'r',sp,yp,'*');
legend('Exact Transformation', 'Approximate Transformation');
title('Numerical Laplace Transform (besselk(0.358, t))')

Zitieren als

Lateef Adewale Kareem (2026). Numerical Laplace Transform (https://de.mathworks.com/matlabcentral/fileexchange/60837-numerical-laplace-transform), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2015a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Bessel functions finden Sie in Help Center und MATLAB Answers
Version Veröffentlicht Versionshinweise
1.0.0.0