1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2008 - INRIA - Serge STEER
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="sub2ind" xml:lang="pt">
18 <refname>sub2ind</refname>
19 <refpurpose>converte matriz de valores subescrtos para índice
24 <title>Seqüência de Chamamento</title>
25 <synopsis>I = sub2ind(dims,i1,i2,...)
30 <title>Parâmetros</title>
35 <para>vetor, as dimensões da matriz </para>
39 <term>i1,i2,...</term>
41 <para>os arrays de valores subescritos (de mesma forma que a matriz
49 <para>matriz cujas colunas contém os valores subescritos. </para>
55 <para>o array de índice linear</para>
61 <title>Descrição</title>
63 <literal>sub2ind</literal> é usado para determinar o índice único
64 equivalente que corresponde ao dado conjunto de valores subescritos.
65 <literal>I = sub2ind(dims,i1,i2,..)</literal> retorna o índice linear
66 equivalente aos subescritos das linha, coluna, ... nos arrays
67 <literal>i1</literal>, <literal>i2</literal>,.. para uma matriz de tamanho
68 <literal>dims</literal>. Neste caso, <literal>i1</literal>,
69 <literal>i2</literal>,.. devem ter o mesmo formato e o resultado
70 <literal>I</literal> tem a mesma forma da matriz. <literal>I =
73 retorna o índice linear equivalente aos
74 subescritos nas colunas da matriz <literal>Mi</literal> para uma matriz
75 com tamanho <literal>dims</literal>. Neste caso <literal>I</literal> é um
80 <title>Exemplos</title>
81 <programlisting role="example"><![CDATA[
85 sub2ind([2,3,2],i,j,k)
87 sub2ind([2,3,2],[i',j',k'])
90 <refsection role="see also">
91 <title>Ver Também</title>
92 <simplelist type="inline">
94 <link linkend="ind2sub">ind2sub</link>
97 <link linkend="extraction">extraction</link>
100 <link linkend="insertion">insertion</link>