487963c92a2b8ed0b515368980a88791ce41e207
[scilab.git] / scilab / modules / elementary_functions / help / ja_JP / searchandsort / find.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
5  * Copyright (C) INRIA
6  *
7  * Copyright (C) 2012 - 2016 - Scilab Enterprises
8  *
9  * This file is hereby licensed under the terms of the GNU GPL v2.0,
10  * pursuant to article 5.3.4 of the CeCILL v.2.1.
11  * This file was originally licensed under the terms of the CeCILL v2.1,
12  * and continues to be available under such terms.
13  * For more information, see the COPYING file which you should have received
14  * along with this program.
15  *
16  -->
17
18 <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="find">
19
20     <refnamediv>
21
22         <refname>find</refname>
23
24         <refpurpose>論理値ベクトルまたは行列のtrue要素の添え字を見つける</refpurpose>
25
26     </refnamediv>
27
28     <refsynopsisdiv>
29
30         <title>呼び出し手順</title>
31
32         <synopsis>[ii]=find(x [,nmax])
33
34             [i1,i2,..]=find(x [,nmax])
35
36         </synopsis>
37
38     </refsynopsisdiv>
39
40     <refsection>
41
42         <title>引数</title>
43
44         <variablelist>
45
46             <varlistentry>
47
48                 <term>x</term>
49
50                 <listitem>
51
52                     <para>は論理値ベクトル,論理値行列,論理値ハイパー行列,
53
54                         "標準"行列またはハイパー行列です.
55
56                     </para>
57
58                 </listitem>
59
60             </varlistentry>
61
62             <varlistentry>
63
64                 <term>nmax</term>
65
66                 <listitem>
67
68                     <para>返される添え字の最大数を指定する整数.
69
70                         デフォルト値は"全て"を意味する -1 です.
71
72                         このオプションは,全ての添え字の探索を避け,処理効率を改善するために
73
74                         使用できます.
75
76                     </para>
77
78                 </listitem>
79
80             </varlistentry>
81
82             <varlistentry>
83
84                 <term>ii, i1, i2, ..  </term>
85
86                 <listitem>
87
88                     <para>整数ベクトルの添字または空行列</para>
89
90                 </listitem>
91
92             </varlistentry>
93
94         </variablelist>
95
96     </refsection>
97
98     <refsection>
99
100         <title>説明</title>
101
102         <para>
103
104             <literal>x</literal> が論理値の場合,
105
106         </para>
107
108         <para>
109
110             <literal>ii=find(x)</literal> は<literal>x(i)</literal>が
111
112             "true"の添字<literal>i</literal>のベクトルを返します.
113
114             trueとなる要素がみつからない場合,空行列が返されます.
115
116         </para>
117
118         <para>
119
120             <literal>[i1,i2,..]=find(x)</literal> は,
121
122             <literal>x(i1(n),i2(n),..)</literal>が "true" の
123
124             添字<literal>i1</literal> (行の場合) および
125
126             <literal>i2</literal> (列の場合),..のベクトルを返します.
127
128             trueとなる要素がみつからない場合,
129
130             <literal>i1</literal>,<literal>i2</literal>, ...の空行列を返します.
131
132         </para>
133
134         <para>
135
136             <literal>x</literal> が標準行列またはハイパー行列の場合,
137
138             <literal>find(x)</literal>は<literal>find(x&lt;&gt;0)</literal>
139
140             と解釈されます.
141
142         </para>
143
144         <para>
145
146             <literal>find([])</literal> は <literal>[]</literal>を返します.
147
148         </para>
149
150     </refsection>
151
152     <refsection>
153
154         <title>例</title>
155
156         <programlisting role="example"><![CDATA[
157 beers=["Desperados", "Leffe", "Kronenbourg", "Heineken"];
158 find(beers=="Leffe") // OK
159 find(beers=="1664") // KO
160 find(beers=="Foster") // KO
161 beers=[beers, "Foster"]
162 find(beers=="Foster") // OK
163 A=rand(1,20);
164 w=find(A<0.4)
165 A(w)
166 w=find(A>100)
167 B=rand(1,20);
168 w=find(B<0.4,2) //最大2個の値を返す
169 H=rand(4,3,5); //ハイパー行列
170 [i,j,k]=find(H>0.9)
171 H(i(1),j(1),k(1))
172  ]]></programlisting>
173
174     </refsection>
175
176     <refsection role="see also">
177
178         <title>参照</title>
179
180         <simplelist type="inline">
181
182             <member>
183
184                 <link linkend="boolean">boolean</link>
185
186             </member>
187
188             <member>
189
190                 <link linkend="extraction">extraction</link>
191
192             </member>
193
194             <member>
195
196                 <link linkend="insertion">insertion</link>
197
198             </member>
199
200             <member>
201
202                 <link linkend="vectorfind">vectorfind</link>
203
204             </member>
205
206         </simplelist>
207
208     </refsection>
209
210 </refentry>
211