laplace transform in matlab

MATLAB provides laplace() function to perform Laplace transform on an input signal. The general syntax is as follows:

main.m
syms s t
F = laplace(f(t),t,s)
31 chars
3 lines

where f(t) is the input signal, t is the time variable, s is the Laplace domain variable, and F is the Laplace transform of f(t).

Alternatively, you can also perform Laplace transform using the tf() function which returns the transfer function of the input signal in the Laplace domain. The syntax is as follows:

main.m
syms s t
sys = tf(num,den)
H = laplace(sys,s)
46 chars
4 lines

where num and den are the numerator and denominator polynomials of the transfer function, sys, and H is the Laplace transform of the transfer function.

related categories

gistlibby LogSnag