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 - Farid BELAHCENE
5 * Copyright (C) 2013 - Samuel GOUGEON : restriction to decimal numbers removed. Examples added for booleans, integer-encoded numbers, text, polynomials, rationals
7 * This file must be used under the terms of the CeCILL.
8 * This source file is licensed as described in the file COPYING, which
9 * you should have received as part of this distribution. The terms
10 * are also available at
11 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
14 <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="flipdim" xml:lang="fr">
16 <refname>flipdim</refname>
18 retourne les éléments de <literal>x</literal> selon une dimension
22 <title>Séquence d'appel</title>
23 <synopsis>y = flipdim(x, dim)</synopsis>
26 <title>Paramètres</title>
31 <para>scalaires, vecteurs, matrices, ou hypermatrices de n'importe quel type, de même taille</para>
37 <para>entier positif</para>
43 <title>Description</title>
45 A partir de <literal>x</literal>, un scalaire/vecteur/matrice/hypermatrice de n'importe quel type et
46 <literal>dim</literal> un entier positif, cette fonction retourne les éléments de
47 <literal>x</literal> selon le nombre dimension <literal>dim</literal> de
48 <literal>x</literal> (<literal>x</literal> et <literal>y</literal> ont la même taille)
52 <title>Exemples</title>
53 <programlisting role="example"><![CDATA[
54 // Exemple 1 : selon la première dimension
55 x = [1 2 3 4; 5 6 7 8];
59 // Exemple 2 : selon la deuxième dimension
63 // Exemple 3 : selon la troisième dimension
64 x = matrix(1:24, [3 2 4]);
68 // Exemple 4 : premier exemple, mais avec des complexes
69 x = [1+%i 2*%i 3 4; 5 6-%i 7 8*%pi*%i];
74 x = int16(grand(4, 3, 2, "uin", -9, 9));
78 x = (grand(3, 4, "uin", -9, 9) > 0);
82 x = matrix(strsplit("a":"x", 1:23), 4, 6);
87 x = inv_coeff(grand(3, 9, "uin", 0, 3), 2);
91 n = inv_coeff(grand(3, 9, "uin", 0 ,3), 2);
92 d = inv_coeff(grand(3, 9, "uin", 0, 3), 2);
98 <title>History</title>
101 <revnumber>5.5.0</revnumber>
102 <revremark>Extension de décimaux à tout type: booléens, entiers, textes, polynômes et rationals.</revremark>