1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="find" xml:lang="pt">
18 <refname>find</refname>
19 <refpurpose>encontra índices de elementos verdadeiros em uma matriz ou
24 <title>Seqüência de Chamamento</title>
25 <synopsis>[ii]=find(x [,nmax])
26 [i1,i2,..]=find(x [,nmax])
30 <title>Parâmetros</title>
35 <para>pode ser um vetor, matriz ou hipermatriz de booleanos, uma
36 matriz ou hipermatriz "padrão".
43 <para>um inteiro fornecendo o número máximo de índices a serem
44 retornados. o valor padrão é -1, que significa "todos". Esta opção
45 pode ser usada por eficiência, para evitar uma busca por todos os
51 <term>ii, i1, i2, ..</term>
53 <para>vetores de índices inteiros ou matrizes vazias</para>
59 <title>Descrição</title>
61 Se <literal>x</literal> é uma matriz booleana,
64 <literal>ii=find(x)</literal> retorna o vetor de índices
65 <literal>i</literal> para os quais <literal>x(i)</literal> é "true"
66 ("verdadeiro").Se nenhum elemento "true" for encontrado, retorna uma
70 <literal>[i1,i2,..]=find(x)</literal> retorna vetores de índices
71 <literal>i1</literal> (para linhas) e <literal>i2</literal> (para
72 colunas),... tais que <literal>x(i1(n),i2(n),..)</literal> ié "true"
73 ("verdadeiro"). Se nenhum elemento "true" for encontrado, retorna matrizes
74 vazias em <literal>i1</literal>, <literal>i2</literal>, ...
77 Se <literal>x</literal> é uma matriz ou hipermatriz padrão
78 <literal>find(x)</literal> é interpretado como
79 <literal>find(x<>0)</literal>
82 <literal>find([])</literal> retorna <literal>[]</literal>
86 <title>Exemplos</title>
87 <programlisting role="example"><![CDATA[
94 w=find(B<0.4,2) //no máximo dois valores retornados
96 H=rand(4,3,5); //uma hipermatriz
102 <refsection role="see also">
103 <title>Ver Também</title>
104 <simplelist type="inline">
106 <link linkend="boolean">boolean</link>
109 <link linkend="extraction">extraction</link>
112 <link linkend="insertion">insertion</link>
115 <link linkend="vectorfind">vectorfind</link>