* fixed / improved: `members`, `part`, `ode`, `ode_optional_output`, `ode_roots`, `plot2d`, `roots`,
`printf`, `sprintf`, `iconvert`, `stdev`, `xlabel`, `and_op`, `or_op`, `tree2code`, `%helps`,
- `scilab|scilex`
+ `scilab|scilex`, `flipdim`
* rewritten: `consolebox`, `double`, `isoview`, `pixel_drawing_mode`, `householder`, `or`, `and`, `format`, `typeof`,
`brackets`, `setlanguage`, `sleep`, `isinf`, `bitor`, `bitxor`, `bitand`, `macr2tree`, `geomean`
* reorganized:
<!--
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2008 - INRIA - Farid BELAHCENE
- * Copyright (C) 2013 - Samuel GOUGEON: restriction to decimal numbers removed. Examples added for booleans, integer-encoded numbers, text, polynomials, rationals
+ * Copyright (C) 2013, 2016 - Samuel GOUGEON : 5.5.0 extensions, page overhauled
*
* Copyright (C) 2012 - 2016 - Scilab Enterprises
*
* along with this program.
*
-->
-<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="en">
+<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="en">
<refnamediv>
<refname>flipdim</refname>
- <refpurpose>reverses the order of (blocs of) rows, columns, pages.. of a matrix or hypermatrix</refpurpose>
+ <refpurpose>reverses the order of (blocks of) rows, columns, pages.. of a matrix or hypermatrix</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Syntax</title>
- <synopsis>y = flipdim(x, dim [,sb])</synopsis>
+ <synopsis>
+ y = flipdim(x, dim)
+ y = flipdim(x, dim, blockSize)
+ </synopsis>
</refsynopsisdiv>
<refsection role="parameters">
<title>Arguments</title>
<varlistentry>
<term>x, y</term>
<listitem>
- <para>scalars, vectors, matrices, or hypermatrices of any type, of same sizes</para>
+ <para>
+ vectors, matrices, or hypermatrices of any regular data type.
+ <varname>y</varname> gets the sizes of <varname>x</varname>.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
<term>dim</term>
<listitem>
- <para>a positive integer, the dimension number along which the flipping should occur</para>
+ <para>
+ positive integer : index of the dimension / direction of <literal>x</literal>
+ along which the order of <varname>x</varname> components must be inverted.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
- <term>sb</term>
+ <term>blockSize</term>
<listitem>
- <para>a positive integer, the size of the blocks to permute</para>
+ <para>
+ a positive integer, sub-multiple of <literal>size(x,dim)</literal>:
+ number of rows, of columns, of pages etc in each block. Default value = 1
+ </para>
</listitem>
</varlistentry>
</variablelist>
<refsection role="description">
<title>Description</title>
<para>
- Given <literal>x</literal>, a scalar/vector/matrix/hypermatrix of any type and
- two positive integers <literal>dim</literal> and <literal>sb</literal>,
- this function flips the x components by blocks of size <literal>sb</literal>
- along the dimension number <literal>dim</literal> of <literal>x</literal>
- (<literal>x</literal> and <literal>y</literal> have the same size).
+ <literal>flipdim(x, 1)</literal> inverts the order of
+ <emphasis role="italic">rows</emphasis> in the matrix or hypermatrix
+ <varname>x</varname>.
</para>
<para>
- The optional parameter <literal>sb</literal> (for Size Block) allows flipping
- <literal>x</literal> by blocks of size <literal>sb*size(x,2)</literal>
- (<literal>dim=1</literal>) or <literal>size(x,1)*sb</literal> (<literal>dim=2</literal>).
+ <literal>flipdim(x, 2)</literal> inverts the order of
+ <emphasis role="italic">columns</emphasis> of <varname>x</varname>.
+ </para>
+ <para>
+ <literal>flipdim(x, 3)</literal> inverts the order of
+ <emphasis role="italic">pages</emphasis> in the hypermatrix
+ <varname>x</varname>. Etc.
+ </para>
+ <para>
+ The optional parameter <literal>blockSize</literal> allows splitting
+ <varname>x</varname> in <literal>size(x,1)/blockSize</literal> blocks
+ of <varname>blockSize</varname> rows (<literal>dim=1</literal>),
+ or in <literal>size(x,2)/blockSize</literal> blocks of <varname>blockSize</varname>
+ columns (<literal>dim=2</literal>), etc (<literal>dim>2</literal>)
+ and to invert their order.
+ In each block, the order of components (rows, columns, pages etc)
+ is unchanged.
</para>
</refsection>
<refsection role="examples">
<title>Examples</title>
<programlisting role="example"><![CDATA[
-// Example 1: flip x components along the first dimension
+// Example 1: flip x rows (= components along the first dimension)
x = [1 2 3 4; 5 6 7 8]
-dim = 1
-y = flipdim(x, dim)
+y = flipdim(x, 1)
-// Example 2: flip x components along the second dimension
-dim = 2
-y = flipdim(x, dim)
+// Example 2: flip x columns (= components along the second dimension)
+y = flipdim(x, 2)
-// Example 3: flip x components along the third dimension
+// Example 3: flip x pages (= components along the third dimension)
x = matrix(1:24, [3 2 4])
-dim = 3
-y = flipdim(x, dim)
+y = flipdim(x, 3)
// Example 4: the first example with complex
x = [1+%i 2*%i 3 4; 5 6-%i 7 8*%pi*%i]
-dim = 1
-y = flipdim(x, dim)
+y = flipdim(x, 1)
// Integer-encoded numbers:
x = int16(grand(4, 3, 2, "uin", -9, 9))
flipdim(r, 2)
]]></programlisting>
<para>
- Examples using <literal>sb</literal>:
+ Examples using <literal>blockSize</literal> :
</para>
<programlisting role="example"><![CDATA[
X = [0 1 2 3 4 5 6 7 8 9 10 11];
flipdim(X, 2, 4) // => [8 9 10 11 4 5 6 7 0 1 2 3]
flipdim(X, 2, 6) // => [6 7 8 9 10 11 0 1 2 3 4 5]
-// Error if sb does not divide the targeted dimension of x.
-y = flipdim(x, 2, 5); // size(X) = [1 12] and sb=5 does not divide 12.
+// Error if blockSize does not divide the targeted dimension of x.
+y = flipdim(x, 2, 5); // size(X) = [1 12] and blockSize=5 does not divide 12.
]]></programlisting>
+ <para>Example of results:</para>
+ <screen><![CDATA[
+--> x
+ x =
+ -5 -2 0 9
+ 0 -7 -6 9
+ -1 -8 -7 8
+
+--> flipdim(x, 1)
+ ans =
+ -1 -8 -7 8
+ 0 -7 -6 9
+ -5 -2 0 9
+
+--> flipdim(x, 2)
+ ans =
+ 9 0 -2 -5
+ 9 -6 -7 0
+ 8 -7 -8 -1
+]]></screen>
+ <para></para>
+ <screen><![CDATA[
+--> x
+ x =
+(:,:,1)
+ 9 4 -3
+ -4 -8 -3
+
+(:,:,2)
+ 5 8 9
+ 4 4 9
+
+--> flipdim(x, 3)
+ ans =
+(:,:,1)
+ 5 8 9
+ 4 4 9
+
+(:,:,2)
+ 9 4 -3
+ -4 -8 -3
+]]></screen>
+ <para></para>
+ <screen><![CDATA[
+--> x
+ x =
+ -2 3 -5 9 -4 -8
+ 2 8 4 -9 6 -6
+ -9 8 3 4 -3 4
+
+--> flipdim(x, 2, 2)
+ ans =
+ -4 -8 -5 9 -2 3
+ 6 -6 4 -9 2 8
+ -3 4 3 4 -9 8
+
+--> flipdim(x, 2, 3)
+ ans =
+ 9 -4 -8 -2 3 -5
+ -9 6 -6 2 8 4
+ 4 -3 4 -9 8 3
+]]></screen>
+ </refsection>
+ <refsection role="see also">
+ <title>See also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="fftshift">fftshift</link>
+ </member>
+ <member>
+ <link linkend="ifftshift">ifftshift</link>
+ </member>
+ <member>
+ <link linkend="colon">colon</link>
+ </member>
+ </simplelist>
</refsection>
<refsection role="history">
<title>History</title>
<revision>
<revnumber>5.5.0</revnumber>
<revremark>
- Extension from decimals to any type: booleans, integers, strings, polynomials and rationals.
- New input argument <literal>sb</literal> to flip <literal>x</literal> blockwise.
+ <itemizedlist>
+ <listitem>
+ Extension to all regular data types: booleans, integers,
+ strings, polynomials, rationals, graphic handles, etc.
+ </listitem>
+ <listitem>
+ New input argument <literal>blockSize</literal> to flip
+ <literal>x</literal> blockwise.
+ </listitem>
+ </itemizedlist>
</revremark>
</revision>
</revhistory>
<!--
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2008 - INRIA - Farid BELAHCENE
- * Copyright (C) 2013 - Samuel GOUGEON: restriction to decimal numbers removed. Examples added for booleans, integer-encoded numbers, text, polynomials, rationals
+ * Copyright (C) 2013, 2016 - Samuel GOUGEON : 5.5.0 extensions, page overhauled
*
* Copyright (C) 2012 - 2016 - Scilab Enterprises
*
* along with this program.
*
-->
-<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">
+<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">
<refnamediv>
<refname>flipdim</refname>
<refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Séquence d'appel</title>
- <synopsis>y = flipdim(x, dim [,sb])</synopsis>
+ <synopsis>
+ y = flipdim(x, dim)
+ y = flipdim(x, dim, blockSize)
+ </synopsis>
</refsynopsisdiv>
<refsection role="parameters">
<title>Paramètres</title>
<varlistentry>
<term>x, y</term>
<listitem>
- <para>scalaires, vecteurs, matrices, ou hypermatrices de n'importe quel type, de même taille</para>
+ <para>
+ scalaires, vecteurs, matrices, ou hypermatrices de n'importe quel type de données régulier.
+ <varname>y</varname> prend la taille de <varname>x</varname>.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
<term>dim</term>
<listitem>
<para>
- entier positif, la dimension de <literal>x</literal> selon laquelle les éléments seront retournés
+ entier positif : n° de la dimension / direction de <literal>x</literal>
+ selon laquelle l'ordre des éléments de <varname>x</varname> doit être inversé.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>sb</term>
+ <term>blockSize</term>
<listitem>
- <para>entier positif, la taille des blocs à permuter</para>
+ <para>
+ entier positif, sous-multiple de <literal>size(x,dim)</literal> :
+ taille des blocs dont l'ordre doit être inversé. Vaut 1 par défaut.
+ </para>
</listitem>
</varlistentry>
</variablelist>
<refsection role="description">
<title>Description</title>
<para>
- A partir de <literal>x</literal>, un scalaire/vecteur/matrice/hypermatrice de n'importe quel type et
- deux entiers positifs <literal>dim</literal> et <literal>sb</literal>, cette fonction retourne les éléments de
- <literal>x</literal> par blocs de taille <literal>sb</literal> selon le nombre dimension <literal>dim</literal> de
- <literal>x</literal> (<literal>x</literal> et <literal>y</literal> ont la même taille)
+ <literal>flipdim(x, 1)</literal> inverse l'ordre des
+ <emphasis role="italic">lignes</emphasis> de la matrice ou hypermatrice
+ <varname>x</varname>.
+ </para>
+ <para>
+ <literal>flipdim(x, 2)</literal> inverse l'ordre des
+ <emphasis role="italic">colonnes</emphasis> de <varname>x</varname>.
+ </para>
+ <para>
+ <literal>flipdim(x, 3)</literal> inverse l'ordre des
+ <emphasis role="italic">pages</emphasis> de l'hypermatrice
+ <varname>x</varname>. etc.
</para>
<para>
- Le paramètre optionnel <literal>sb</literal> (pour Size Block) permet de retounerles éléments de <literal>x</literal>
- par blocs de taille <literal>sb*size(x,2)</literal> (<literal>dim=1</literal>)
- ou <literal>size(x,1)*sb</literal> (<literal>dim=2</literal>).
+ Le paramètre optionnel <literal>blockSize</literal> permet d'inverser l'ordre des
+ <literal>size(x,1)/blockSize</literal> blocs de <varname>blockSize</varname>
+ lignes de <varname>x</varname> (<literal>dim=1</literal>), ou des
+ <literal>size(x,2)/blockSize</literal> blocs de <varname>blockSize</varname>
+ colonnes (<literal>dim=2</literal>), etc (<literal>dim>2</literal>).
+ À l'intérieur de chaque bloc, l'ordre des éléments (lignes, colonnes, etc) n'est pas modifié.
</para>
</refsection>
<refsection role="examples">
flipdim(r, 2)
]]></programlisting>
<para>
- Exemples utilisant <literal>sb</literal> :
+ Exemples utilisant <literal>blockSize</literal> :
</para>
<programlisting role="example"><![CDATA[
X = [0 1 2 3 4 5 6 7 8 9 10 11];
flipdim(X, 2, 4) // => [8 9 10 11 4 5 6 7 0 1 2 3]
flipdim(X, 2, 6) // => [6 7 8 9 10 11 0 1 2 3 4 5]
-// Erreur si sb ne divise pas la dimension ciblée de x.
-y = flipdim(x, 2, 5); // size(X) = [1 12] et sb=5 ne divise pas 12.
+// Erreur si la valeur de blockSize n'est pas sous-multiple de la dimension ciblée de x.
+y = flipdim(x, 2, 5); // size(X) = [1 12] et blockSize=5 ne divise pas 12.
]]></programlisting>
+ <para>Exemple de résultats :</para>
+ <screen><![CDATA[
+--> x
+ x =
+ -5 -2 0 9
+ 0 -7 -6 9
+ -1 -8 -7 8
+
+--> flipdim(x, 1)
+ ans =
+ -1 -8 -7 8
+ 0 -7 -6 9
+ -5 -2 0 9
+
+--> flipdim(x, 2)
+ ans =
+ 9 0 -2 -5
+ 9 -6 -7 0
+ 8 -7 -8 -1
+]]></screen>
+ <para></para>
+ <screen><![CDATA[
+--> x
+ x =
+(:,:,1)
+ 9 4 -3
+ -4 -8 -3
+
+(:,:,2)
+ 5 8 9
+ 4 4 9
+
+--> flipdim(x, 3)
+ ans =
+(:,:,1)
+ 5 8 9
+ 4 4 9
+
+(:,:,2)
+ 9 4 -3
+ -4 -8 -3
+]]></screen>
+ <para></para>
+ <screen><![CDATA[
+--> x
+ x =
+ -2 3 -5 9 -4 -8
+ 2 8 4 -9 6 -6
+ -9 8 3 4 -3 4
+
+--> flipdim(x, 2, 2)
+ ans =
+ -4 -8 -5 9 -2 3
+ 6 -6 4 -9 2 8
+ -3 4 3 4 -9 8
+
+--> flipdim(x, 2, 3)
+ ans =
+ 9 -4 -8 -2 3 -5
+ -9 6 -6 2 8 4
+ 4 -3 4 -9 8 3
+]]></screen>
+ </refsection>
+ <refsection role="see also">
+ <title>Voir aussi</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="fftshift">fftshift</link>
+ </member>
+ <member>
+ <link linkend="ifftshift">ifftshift</link>
+ </member>
+ <member>
+ <link linkend="colon">colon</link>
+ </member>
+ </simplelist>
</refsection>
<refsection role="history">
<title>History</title>
<revision>
<revnumber>5.5.0</revnumber>
<revremark>
- Extension de décimaux à tout type : booléens, entiers, chaines de caractères, polynômes et fractions rationnelles.
- Nouveau paramètre optionnel <literal>sb</literal> pour retourner <literal>x</literal> par blocs.
+ <itemizedlist>
+ <listitem>
+ Extension aux matrices et hypermatrices de booléens, entiers encodés, textes,
+ polynômes, fractions rationnelles, identifiants graphiques, etc.
+ </listitem>
+ <listitem>
+ Nouveau paramètre optionnel <literal>blockSize</literal> pour réordonner
+ <literal>x</literal> par blocs.
+ </listitem>
+ </itemizedlist>
</revremark>
</revision>
</revhistory>
<!--
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2008 - INRIA - Farid BELAHCENE
+ * Copyright (C) 2013, 2016 - Samuel GOUGEON : 5.5.0 extensions, page overhauled
*
* Copyright (C) 2012 - 2016 - Scilab Enterprises
*
* along with this program.
*
-->
-<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="ja">
+<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="ja">
<refnamediv>
<refname>flipdim</refname>
<refpurpose>指定した次元に沿って x ブロック要素を反転</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>呼び出し手順</title>
- <synopsis>y = flipdim(x, dim [,sb])</synopsis>
+ <synopsis>
+ y = flipdim(x, dim)
+ y = flipdim(x, dim, blockSize)
+ </synopsis>
</refsynopsisdiv>
<refsection>
<title>引数</title>
<varlistentry>
<term>x, y</term>
<listitem>
- <para>任意の型, 同じ大きさのスカラー, ベクトル, 行列またはハイパー行列</para>
+ <para>
+ ベクトル、行列、または任意の通常のデータ型のハイパーマトリックスを含む。
+ <varname> y </varname>は<varname> x </varname>のサイズを取得します。
+ </para>
</listitem>
</varlistentry>
<varlistentry>
<term>dim</term>
<listitem>
- <para>正の整数, 反転させる次元の番号</para>
+ <para>
+ positive integer : index of the dimension / direction of <literal>x</literal>
+ along which the order of <varname>x</varname> components must be inverted.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
- <term>sb</term>
+ <term>blockSize</term>
<listitem>
- <para>正の整数, 交換するブロックの大きさ</para>
+ <para>
+ a positive integer, sub-multiple of <literal>size(x,dim)</literal>:
+ number of rows, of columns, of pages etc in each block. Default value = 1
+ </para>
</listitem>
</varlistentry>
</variablelist>
<refsection>
<title>説明</title>
<para>
- 任意の型のスカラー/ベクトル/配列/ハイパー行列 <literal>x</literal>と
- 2つの正の整数<literal>dim</literal>および<literal>sb</literal>を指定すると,
- この関数は大きさ<literal>sb</literal>のブロック要素により
- <literal>x</literal>の次元番号 <literal>dim</literal>
- に沿って x の要素を反転します.
- (<literal>x</literal> および <literal>y</literal> は同じ大きさとなります)
+ <literal>flipdim(x, 1)</literal> inverts the order of
+ <emphasis role="italic">rows</emphasis> in the matrix or hypermatrix
+ <varname>x</varname>.
</para>
<para>
- オプションパラメータ<literal>sb</literal> (Size Block) により,
- ブロックの大きさ <literal>sb*size(x,2)</literal>
- (<literal>dim=1</literal>) または <literal>size(x,1)*sb</literal> (<literal>dim=2</literal>)
- での反転が可能となります.
+ <literal>flipdim(x, 2)</literal> inverts the order of
+ <emphasis role="italic">columns</emphasis> of <varname>x</varname>.
+ </para>
+ <para>
+ <literal>flipdim(x, 3)</literal> inverts the order of
+ <emphasis role="italic">pages</emphasis> in the hypermatrix
+ <varname>x</varname>. Etc.
+ </para>
+ <para>
+ The optional parameter <literal>blockSize</literal> allows splitting
+ <varname>x</varname> in <literal>size(x,1)/blockSize</literal> blocks
+ of <varname>blockSize</varname> rows (<literal>dim=1</literal>),
+ or in <literal>size(x,2)/blockSize</literal> blocks of <varname>blockSize</varname>
+ columns (<literal>dim=2</literal>), etc (<literal>dim>2</literal>)
+ and to invert their order.
+ In each block, the order of components (rows, columns, pages etc)
+ is unchanged.
</para>
</refsection>
<refsection>
<title>例</title>
<programlisting role="example"><![CDATA[
// 例 1: x の要素を最初の次元に沿って反転
-x=[1 2 3 4; 5 6 7 8];
-dim=1;
-y=flipdim(x,dim)
+x = [1 2 3 4; 5 6 7 8];
+y = flipdim(x, 1)
+
// 例2: x の要素を2番目の次元に沿って反転
-dim=2;
-y=flipdim(x,dim)
+y = flipdim(x, 2)
+
// 例3: x の要素を3番目の次元に沿って反転
-x=matrix(1:48,[3 2,4,2]);
-dim=3;
-y=flipdim(x,dim)
+x = matrix(1:48,[3 2,4,2]);
+y = flipdim(x, 3)
+
// 例4: 最初の例を複素数に
x = [1+%i 2*%i 3 4; 5 6-%i 7 8*%pi*%i]
-dim = 1
-y = flipdim(x, dim)
+y = flipdim(x, 1)
+
// 整数エンコードされた数値
x = int16(grand(4, 3, 2, "uin", -9, 9))
y = flipdim(x, 1)
+
// 論理値:
x = (grand(3, 4, "uin", -9, 9) > 0)
y = flipdim(x, 2)
+
// テキスト:
x = matrix(strsplit("a":"x", 1:23), 4, 6);
x = x+x
flipdim(x, 2)
+
// 多項式:
x = inv_coeff(grand(3, 9, "uin", 0, 3), 2)
flipdim(x, 1)
+
// 有理数:
n = inv_coeff(grand(3, 9, "uin", 0, 3), 2);
d = inv_coeff(grand(3, 9, "uin", 0, 3), 2);
flipdim(r, 2)
]]></programlisting>
<para>
- <literal>sb</literal>の使用例:
+ <literal>blockSize</literal>の使用例 :
</para>
<programlisting role="example"><![CDATA[
X = [0 1 2 3 4 5 6 7 8 9 10 11];
flipdim(X, 2, 3) // => [9 10 11 6 7 8 3 4 5 0 1 2]
flipdim(X, 2, 4) // => [8 9 10 11 4 5 6 7 0 1 2 3]
flipdim(X, 2, 6) // => [6 7 8 9 10 11 0 1 2 3 4 5]
-// sbがxの指定した次元を分割しない場合はエラー.
-y = flipdim(x, 2, 5); // size(X) = [1 12] および sb=5 は 12を割り切れない.
+// blockSizeがxの指定した次元を分割しない場合はエラー.
+y = flipdim(x, 2, 5); // size(X) = [1 12] および blockSize=5 は 12を割り切れない.
]]></programlisting>
+ <para>Example of results:</para>
+ <screen><![CDATA[
+--> x
+ x =
+ -5 -2 0 9
+ 0 -7 -6 9
+ -1 -8 -7 8
+
+--> flipdim(x, 1)
+ ans =
+ -1 -8 -7 8
+ 0 -7 -6 9
+ -5 -2 0 9
+
+--> flipdim(x, 2)
+ ans =
+ 9 0 -2 -5
+ 9 -6 -7 0
+ 8 -7 -8 -1
+]]></screen>
+ <para></para>
+ <screen><![CDATA[
+--> x
+ x =
+(:,:,1)
+ 9 4 -3
+ -4 -8 -3
+
+(:,:,2)
+ 5 8 9
+ 4 4 9
+
+--> flipdim(x, 3)
+ ans =
+(:,:,1)
+ 5 8 9
+ 4 4 9
+
+(:,:,2)
+ 9 4 -3
+ -4 -8 -3
+]]></screen>
+ <para></para>
+ <screen><![CDATA[
+--> x
+ x =
+ -2 3 -5 9 -4 -8
+ 2 8 4 -9 6 -6
+ -9 8 3 4 -3 4
+
+--> flipdim(x, 2, 2)
+ ans =
+ -4 -8 -5 9 -2 3
+ 6 -6 4 -9 2 8
+ -3 4 3 4 -9 8
+
+--> flipdim(x, 2, 3)
+ ans =
+ 9 -4 -8 -2 3 -5
+ -9 6 -6 2 8 4
+ 4 -3 4 -9 8 3
+]]></screen>
+ </refsection>
+ <refsection role="see also">
+ <title>参照</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="fftshift">fftshift</link>
+ </member>
+ <member>
+ <link linkend="ifftshift">ifftshift</link>
+ </member>
+ <member>
+ <link linkend="colon">colon</link>
+ </member>
+ </simplelist>
</refsection>
<refsection>
<title>履歴</title>
<revremark>
10進数から任意の型に拡張: 論理値, 整数, 文字列, 多項式および有理数.
<literal>x</literal>ブロック毎に反転するために,
- 新しい入力引数 <literal>sb</literal>が追加されました.
+ 新しい入力引数 <literal>blockSize</literal>が追加されました.
</revremark>
</revision>
</revhistory>
+++ /dev/null
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA - Farid BELAHCENE
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="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="pt">
- <refnamediv>
- <refname>flipdim</refname>
- <refpurpose>gira os componentes de x ao longo de uma dada
- dimensão
- </refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <title>Seqüência de Chamamento</title>
- <synopsis>y=flipdim(x,dim)</synopsis>
- </refsynopsisdiv>
- <refsection>
- <title>Parâmetros</title>
- <variablelist>
- <varlistentry>
- <term>x</term>
- <listitem>
- <para>um escalar, vetor ou array de reais</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>dim</term>
- <listitem>
- <para>um inteiro positivo</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>y</term>
- <listitem>
- <para>um escalar, vetor ou array de reais</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsection>
- <refsection>
- <title>Descrição</title>
- <para>
- Dado <literal>x</literal>, um escalar/vetor/array de reais e
- <literal>dim</literal> um inteiro positivo, esta função gira os
- componentes de x ao longo da dimensão de número <literal>dim</literal> de
- <literal>x</literal> (<literal>x</literal> e <literal>y</literal> têm o
- mesmo tamanho)
- </para>
- </refsection>
- <refsection>
- <title>Exemplos</title>
- <programlisting role="example"><![CDATA[
-// exemplo 1: girando os componentes de x ao longo da primeira dimensão
-x=[1 2 3 4; 5 6 7 8];
-dim=1;
-y=flipdim(x,dim)
-
-// exemplo 1: girando os componentes de x ao longo da segunda dimensão
-dim=2;
-y=flipdim(x,dim)
-
-// exemplo e: girando os componentes de x ao longo da terceira dimensão
-x=matrix(1:48,[3 2,4,2]);
-dim=3;
-y=flipdim(x,dim)
- ]]></programlisting>
- </refsection>
- <refsection role="see also">
- <title>Ver Também</title>
- <para>F.Belahcene</para>
- </refsection>
-</refentry>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA - Farid BELAHCENE
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- *
- -->
-<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="ru">
- <refnamediv>
- <refname>flipdim</refname>
- <refpurpose>зеркальное отражение компонентов x по заданному измерению</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <title>Синтаксис</title>
- <synopsis>y=flipdim(x,dim)</synopsis>
- </refsynopsisdiv>
- <refsection>
- <title>Аргументы</title>
- <variablelist>
- <varlistentry>
- <term>x</term>
- <listitem>
- <para>скаляр, вектор или массив чисел</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>dim</term>
- <listitem>
- <para>положительное целое число</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>y</term>
- <listitem>
- <para>скаляр, вектор или массив чисел</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsection>
- <refsection>
- <title>Описание</title>
- <para>
- Для указанных <literal>x</literal>, скаляра/вектора/массива чисел и
- <literal>dim</literal>, положительного целого числа, эта функция зеркально
- отражает компоненты <literal>x</literal> по номеру <literal>dim</literal>
- размерности <literal>x</literal> (<literal>x</literal> и <literal>y</literal>
- одного размера)
- </para>
- </refsection>
- <refsection>
- <title>Примеры</title>
- <programlisting role="example"><![CDATA[
-// Пример 1: зеркальное отражение компонентов x
-// по первой размерности
-x=[1 2 3 4; 5 6 7 8];
-dim=1;
-y=flipdim(x,dim)
-
-// Пример 2: зеркальное отражение компонентов x
-// по второй размерности
-dim=2;
-y=flipdim(x,dim)
-
-// Пример 3: зеркальное отражение компонентов x
-// по третьей размерности
-x=matrix(1:48,[3, 2, 4, 2]);
-dim=3;
-y=flipdim(x,dim)
- ]]></programlisting>
- </refsection>
-</refentry>