chirpmulti_fresp.m
SYNTAX: [gain,phi,freq] = chirpmulti_fresp(input_d,input_t,
output_d,output_t,min_freq, max_freq, in_yaxis, out_yaxis,
inpowerof2, out_powerof2, npeaks, showplots)
PURPOSE: multidimensional version of inout_fresp.m for chirp wave
signal input. Modified from same type of algorithm for sine wave inputs.
Not very successful in getting good data from chirp wave inputs because
of S/N problems, so results should be viewed with suspicion.
INPUT:
input_d = input data vector
input_t = input time vector
output_d = output data vector
output_t = output time vector
min_freq = minimum frequency - don't look at spectrum below this
max_freq = maximum frequency - don't look at spectrum above this
in_yaxis = vector of ymin and ymax values for input data plots(optional)
out_yaxis=vector of ymin and ymax values for output data plots(optional)
powerof2 = integer = some power of 2 greater than the number of samples
in either input_d or output_d, to use in fft (optional)
signal is zero filled to this number. (this speeds up fft
calculation as well as giving finer frequency sampling for
more accurate gain/phase calculation)
npeaks = number of points (peaks) in spectrum at which to compute resp.
showplots= set=1 if you want to see plots, otherwise no plots (optional)
OUTPUT:
gain = calculated gain from input to output signal
phi = calculated phase from input to output signal (degrees)
freq = calculated frequency of input signal (output is checked also)
RESTRICTIONS:
(1) Both input and output data MUST have uniform sampling rate.
(2) Both input and output data MUST represent same time window.
Dependencies