a9980119892d5fb4ad5cc7047bafff3b64901298
[scilab.git] / scilab / modules / signal_processing / help / ja_JP / filters / remezb.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="remezb">
3     <refnamediv>
4         <refname>remezb</refname>
5         <refpurpose>振幅応答のミニマックス近似</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>呼び出し手順</title>
9         <synopsis>[an]=remezb(nc,fg,ds,wt)</synopsis>
10     </refsynopsisdiv>
11     <refsection>
12         <title>パラメータ</title>
13         <variablelist>
14             <varlistentry>
15                 <term>nc</term>
16                 <listitem>
17                     <para>余弦関数の数</para>
18                 </listitem>
19             </varlistentry>
20             <varlistentry>
21                 <term>fg</term>
22                 <listitem>
23                     <para>[0,.5)の範囲の周波数点のグリッド</para>
24                 </listitem>
25             </varlistentry>
26             <varlistentry>
27                 <term>ds</term>
28                 <listitem>
29                     <para>
30                         グリッド<literal>fg</literal>の指定する振幅
31                     </para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>wt</term>
36                 <listitem>
37                     <para>
38                         グリッド<literal>fg</literal>の誤差の重み関数
39                     </para>
40                 </listitem>
41             </varlistentry>
42             <varlistentry>
43                 <term>an</term>
44                 <listitem>
45                     <para>余弦フィルタ係数</para>
46                 </listitem>
47             </varlistentry>
48         </variablelist>
49     </refsection>
50     <refsection>
51         <title>説明</title>
52         <para>
53             周波数領域振幅応答のミニマックス近似.
54             この近似は,n=0,1,...,ncとして
55             <literal>h = sum[a(n)*cos(wn)]</literal>
56             の形式となります.
57             以下のコマンドによりFIR, 線形位相フィルタを
58             関数の出力から得ることができます.
59         </para>
60         <programlisting role=""><![CDATA[ 
61 hn(1:nc-1)=an(nc:-1:2)/2;
62 hn(nc)=an(1);
63 hn(nc+1:2*nc-1)=an(2:nc)/2;
64  ]]></programlisting>
65     </refsection>
66     <refsection>
67         <title>例</title>
68         <programlisting role="example"><![CDATA[ 
69 // Choose the number of cosine functions and create a dense grid 
70 // in [0,.24) and [.26,.5)
71 nc=21;ngrid=nc*16;
72 fg=.24*(0:ngrid/2-1)/(ngrid/2-1);
73 fg(ngrid/2+1:ngrid)=fg(1:ngrid/2)+.26*ones(1:ngrid/2);
74
75 // Specify a low pass filter magnitude for the desired response
76 ds(1:ngrid/2)=ones(1:ngrid/2);
77 ds(ngrid/2+1:ngrid)=zeros(1:ngrid/2);
78
79 // Specify a uniform weighting function
80 wt=ones(fg);
81
82 // Run remezb
83 an=remezb(nc,fg,ds,wt)
84
85 // Make a linear phase FIR filter 
86 hn(1:nc-1)=an(nc:-1:2)/2;
87 hn(nc)=an(1);
88 hn(nc+1:2*nc-1)=an(2:nc)/2;
89
90 // Plot the filter's magnitude response
91 plot(.5*(0:255)/256,frmag(hn,256));
92
93 // Choose the number of cosine functions and create a dense grid in [0,.5)
94 nc=21; ngrid=nc*16;
95 fg=.5*(0:(ngrid-1))/ngrid;
96
97 // Specify a triangular shaped magnitude for the desired response
98 ds(1:ngrid/2)=(0:ngrid/2-1)/(ngrid/2-1);
99 ds(ngrid/2+1:ngrid)=ds(ngrid/2:-1:1);
100
101 // Specify a uniform weighting function
102 wt=ones(fg);
103
104 // Run remezb
105 an=remezb(nc,fg,ds,wt)
106
107 // Make a linear phase FIR filter 
108 hn(1:nc-1)=an(nc:-1:2)/2;
109 hn(nc)=an(1);
110 hn(nc+1:2*nc-1)=an(2:nc)/2;
111
112 // Plot the filter's magnitude response
113 plot(.5*(0:255)/256,frmag(hn,256));
114  ]]></programlisting>
115     </refsection>
116     <refsection role="see also">
117         <title>参照</title>
118         <simplelist type="inline">
119             <member>
120                 <link linkend="eqfir">eqfir</link>
121             </member>
122         </simplelist>
123     </refsection>
124 </refentry>