summaryrefslogtreecommitdiff
path: root/help/en_US/stmcb.xml
blob: 79729260e78c26520bab935df58f17f83abb2fad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * This help file was generated from stmcb.sci using help_from_sci().
 *
 -->

<refentry version="5.0-subset Scilab" xml:id="stmcb" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:scilab="http://www.scilab.org"
          xmlns:db="http://docbook.org/ns/docbook">

  <refnamediv>
    <refname>stmcb</refname>
    <refpurpose>Compute linear model using Steiglitz-McBride iteration</refpurpose>
    <para> </para>
  </refnamediv>


<refsynopsisdiv>
   <title>Calling Sequence</title>
   <synopsis>
[b,a] = stmcb(h,nb,na)
[b,a] = stmcb(y,x,nb,na)
[b,a] = stmcb(h,nb,na,niter)
[b,a] = stmcb(y,x,nb,na,niter)
[b,a] = stmcb(h,nb,na,niter,ai)
[b,a] = stmcb(y,x,nb,na,niter,ai)
   </synopsis>
   <para> </para>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
   <varlistentry><term>b,a </term>
      <listitem><para> : coefficients of the system function,nb is number of zeros and na is number of poles</para></listitem></varlistentry>
   <varlistentry><term>h</term>
      <listitem><para> : impulse response of the system</para></listitem></varlistentry>
   <varlistentry><term>x, y</term>
      <listitem><para> : input and output of same length given to the system</para></listitem></varlistentry>
   <varlistentry><term>nitren</term>
      <listitem><para> : number of iterations</para></listitem></varlistentry>
   <varlistentry><term>ai</term>
      <listitem><para> : initial estimate of the denominator coefficients</para></listitem></varlistentry>
      <para> </para>
      <para>Accepts only real i/ps, complex i/ps are not accepted due to limitations of the 'filter' function in Scilab</para>
</variablelist>
   <para> </para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
h = fscanfMat("macros/stmcb_h_data.txt"); //required impulse response samples
plot(h); //plotting required impulse response
title "Required impulse respose (h) plot "
xlabel "samples (n)"
ylabel "magnitude {h(n)} "
nb = 4 ; // four zeros
na = 4 ; //four poles
stmcb(h,nb,na)
   ]]></programlisting>

<scilab:image>
h = [0.0003
0.0033
0.0149
0.0432
0.0911
0.1493
0.1985
0.2190
0.2007
0.1479
0.0764
0.0070
-0.0429
-0.0649
-0.0601
-0.0375
-0.0092
0.0142
0.0265
0.0267
0.0180
0.0057
-0.0052
-0.0115
-0.0123
-0.0088
-0.0033
0.0018
0.0050
0.0057
0.0043
0.0018
-0.0006
-0.0021
-0.0026
-0.0021
-0.0010
0.0001
0.0009
0.0012
0.0010
0.0005
0.0000
-0.0004
-0.0005
-0.0005
-0.0003
-0.0000
0.0002
0.0002
0.0002
0.0001
0.0000
-0.0001
-0.0001
-0.0001
-0.0001
-0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
-0.0000 ]

plot(h); //plotting required impulse response
title "Required impulse respose (h) plot "
xlabel "samples (n)"
ylabel "magnitude {h(n)} "

</scilab:image>
</refsection>

</refentry>