Frequency response of rational function object
[resp,outfreq] = freqresp(h,infreq)
[resp,outfreq] = freqresp(h,infreq) computes
the frequency response,
resp, of the rational function
h, at the frequencies specified by
h is the handle of a rational function
object returned by
a vector of positive frequencies, in Hz, over which the frequency
response is calculated.
The output argument
outfreq is a vector that
contains the same frequencies as the input frequency vector, in order
of increasing frequency. The frequency response,
is a vector of frequency response values corresponding to these frequencies.
It is computed using the analytical form of the rational function
Delay are properties of the rational function
The following example shows you how to compute the frequency
response of the data stored in the file
reading it into an
rfdata object, fitting a rational
function object to the data, and using the
to compute the frequency 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,freq]=freqresp(fit_data,freq); plot(freq/1e9,db(resp)); figure plot(freq/1e9,unwrap(angle(resp)));