1 <?xml version="1.0" encoding="UTF-8"?>
4 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
7 * Copyright (C) 2012 - 2016 - Scilab Enterprises
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.
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">
22 <refname>find</refname>
24 <refpurpose>論理値ベクトルまたは行列のtrue要素の添え字を見つける</refpurpose>
32 <synopsis>[ii]=find(x [,nmax])
34 [i1,i2,..]=find(x [,nmax])
52 <para>は論理値ベクトル,論理値行列,論理値ハイパー行列,
68 <para>返される添え字の最大数を指定する整数.
70 デフォルト値は"全て"を意味する -1 です.
72 このオプションは,全ての添え字の探索を避け,処理効率を改善するために
84 <term>ii, i1, i2, .. </term>
88 <para>整数ベクトルの添字または空行列</para>
104 <literal>x</literal> が論理値の場合,
110 <literal>ii=find(x)</literal> は<literal>x(i)</literal>が
112 "true"の添字<literal>i</literal>のベクトルを返します.
114 trueとなる要素がみつからない場合,空行列が返されます.
120 <literal>[i1,i2,..]=find(x)</literal> は,
122 <literal>x(i1(n),i2(n),..)</literal>が "true" の
124 添字<literal>i1</literal> (行の場合) および
126 <literal>i2</literal> (列の場合),..のベクトルを返します.
130 <literal>i1</literal>,<literal>i2</literal>, ...の空行列を返します.
136 <literal>x</literal> が標準行列またはハイパー行列の場合,
138 <literal>find(x)</literal>は<literal>find(x<>0)</literal>
146 <literal>find([])</literal> は <literal>[]</literal>を返します.
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
168 w=find(B<0.4,2) //最大2個の値を返す
169 H=rand(4,3,5); //ハイパー行列
176 <refsection role="see also">
180 <simplelist type="inline">
184 <link linkend="boolean">boolean</link>
190 <link linkend="extraction">extraction</link>
196 <link linkend="insertion">insertion</link>
202 <link linkend="vectorfind">vectorfind</link>