Impulse response for rational function object
Note:

[resp,t] = impulse(h,ts,n)
[resp,t] = impulse(h,ts,n)
computes
the impulse response, resp
, of the rational function
object, h
, over the time period specified by ts
and n
.
Note:
While you can compute the output response for a rational function
object by computing the impulse response of the object and then convolving
that response with the input signal, this approach is not recommended.
Instead, you should use the 
The input h
is the handle of a rational function
object. ts
is a positive scalar value that specifies
the sample time of the computed impulse response, and n
is
a positive integer that specifies the total number of samples in the
response.
The vector of time samples of the impulse response, t
,
is computed from the inputs as t = [0,ts,2*ts,...,(n1)*ts]
.
The impulse response, resp
, is an n
element
vector of impulse response values corresponding to these times. It
is computed using the analytical form of the rational function
$$resp={\displaystyle \sum _{k=1}^{M}{C}_{k}{e}^{{A}_{k}(tDelay)}u(tDelay)+D\delta (tDelay)}$$
where
A
, C
, D
,
and Delay
are properties of the rational function
object, h
.
M
is the number of poles in the
rational function object.
The following example shows you how to compute the impulse response
of the data stored in the file default.s2p
by fitting
a rational function object to the data and using the impulse
method
to compute the impulse response of the object.
orig_data=read(rfdata.data,'default.s2p') freq=orig_data.Freq; data=orig_data.S_Parameters(2,1,:); fit_data=rationalfit(freq,data) [resp,t]=impulse(fit_data,1e12,1e4); plot(t,resp);