comparison scripts/control/system/fir2sys.m @ 5016:bdbee5282954

[project @ 2004-09-22 02:50:35 by jwe]
author jwe
date Wed, 22 Sep 2004 02:50:36 +0000
parents b8105302cfe8
children 4c8a2e4e0717
comparison
equal deleted inserted replaced
5015:6d481b6e349e 5016:bdbee5282954
16 ## along with Octave; see the file COPYING. If not, write to the Free 16 ## along with Octave; see the file COPYING. If not, write to the Free
17 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. 17 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18 18
19 ## -*- texinfo -*- 19 ## -*- texinfo -*-
20 ## @deftypefn {Function File} {} fir2sys (@var{num}, @var{tsam}, @var{inname}, @var{outname}) 20 ## @deftypefn {Function File} {} fir2sys (@var{num}, @var{tsam}, @var{inname}, @var{outname})
21 ## construct a system data structure from FIR description 21 ## construct a system data structure from @acronym{FIR} description
22 ## 22 ##
23 ## @strong{Inputs:} 23 ## @strong{Inputs}
24 ## @table @var 24 ## @table @var
25 ## @item num 25 ## @item num
26 ## vector of coefficients @math{[c_0 c_1 ... c_n]} 26 ## vector of coefficients
27 ## of the SISO FIR transfer function
28 ## @ifinfo 27 ## @ifinfo
29 ## 28 ## [c0, c1, ..., cn]
30 ## C(z) = c0 + c1*z^@{-1@} + c2*z^@{-2@} + ... + znz^@{-n@}
31 ##
32 ## @end ifinfo 29 ## @end ifinfo
33 ## @iftex 30 ## @iftex
34 ## @tex 31 ## @tex
35 ## $$C(z) = c0 + c1*z^{-1} + c2*z^{-2} + ... + znz^{-n}$$ 32 ## $ [c_0, c_1, \ldots, c_n ]$
33 ## @end tex
34 ## @end iftex
35 ## of the @acronym{SISO} @acronym{FIR} transfer function
36 ## @ifinfo
37 ## C(z) = c0 + c1*z^(-1) + c2*z^(-2) + ... + cn*z^(-n)
38 ## @end ifinfo
39 ## @iftex
40 ## @tex
41 ## $$ C(z) = c_0 + c_1z^{-1} + c_2z^{-2} + \ldots + c_nz^{-n} $$
36 ## @end tex 42 ## @end tex
37 ## @end iftex 43 ## @end iftex
38 ## 44 ##
39 ## @item tsam 45 ## @item tsam
40 ## sampling time (default: 1) 46 ## sampling time (default: 1)
44 ## 50 ##
45 ## @item outname 51 ## @item outname
46 ## name of output signal; may be a string or a list with a single entry. 52 ## name of output signal; may be a string or a list with a single entry.
47 ## @end table 53 ## @end table
48 ## 54 ##
49 ## @strong{Outputs} 55 ## @strong{Output}
50 ## @var{sys} (system data structure) 56 ## @table @var
57 ## @item sys
58 ## system data structure
59 ## @end table
51 ## 60 ##
52 ## @strong{Example} 61 ## @strong{Example}
53 ## @example 62 ## @example
54 ## octave:1> sys = fir2sys([1 -1 2 4],0.342,"A/D input","filter output"); 63 ## octave:1> sys = fir2sys([1 -1 2 4],0.342,\
64 ## > "A/D input","filter output");
55 ## octave:2> sysout(sys) 65 ## octave:2> sysout(sys)
56 ## Input(s) 66 ## Input(s)
57 ## 1: A/D input 67 ## 1: A/D input
58 ## 68 ##
59 ## Output(s): 69 ## Output(s):