Next: , Up: sysinterface


29.2.1 Finite impulse response system interface functions

— Function File: fir2sys (num, tsam, inname, outname)

construct a system data structure from FIR description

Inputs

num
vector of coefficients [c0, c1, ..., cn] of the SISO FIR transfer function C(z) = c0 + c1*z^(-1) + c2*z^(-2) + ... + cn*z^(-n)
tsam
sampling time (default: 1)
inname
name of input signal; may be a string or a list with a single entry.
outname
name of output signal; may be a string or a list with a single entry.

Output

sys
system data structure

Example

          octave:1> sys = fir2sys([1 -1 2 4],0.342,\
          > "A/D input","filter output");
          octave:2> sysout(sys)
          Input(s)
                  1: A/D input
          
          Output(s):
                  1: filter output (discrete)
          
          Sampling interval: 0.342
          transfer function form:
          1*z^3 - 1*z^2 + 2*z^1 + 4
          -------------------------
          1*z^3 + 0*z^2 + 0*z^1 + 0
     

— Function File: [c, tsam, input, output] = sys2fir (sys)

Extract FIR data from system data structure; see fir2sys for parameter descriptions.