<?xml version="1.0" encoding="UTF-8"?>
<!--
*
* Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2013 - S/E - Sylvestre LEDRU
*
 * 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:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="jautoTranspose">
    <refnamediv>
        <refname>jautoTranspose</refname>
        <refpurpose>Set the way to convert matrices</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            method = jautoTranspose()
            jautoTranspose(method)
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Parameters</title>
        <variablelist>
            <varlistentry>
                <term>method</term>
                <listitem>
                    <para>A boolean giving the type of conversion</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            In Scilab a matrix such as <literal>[1 2 3;4 5 6]</literal> is stored <literal>[1 4 2 5 3 6]</literal> (column by column). In Java the same matrix is stored as <literal>[-&gt;[1 2 3] -&gt;[4 5 6]]</literal> (array of pointers).
        </para>
        <para>
            When method is '%f' (column-row), the internal array <literal>[1 4 2 5 3 6]</literal> is passed as it is and Java creates the array <literal>[-&gt;[1 4] -&gt;[2 5] -&gt;[3 6]]</literal>.
        </para>
        <para>
            When method is 't' (row-column), the array <literal>[1 4 2 5 3 6]</literal> is passed as <literal>[1 2 3 4 5 6]</literal> and converted into <literal>[-&gt;[1 2 3] -&gt;[4 5 6]]</literal>.
        </para>
        <para>
            By default, the method is set to '%f'.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
               jautoTranspose()
               jautoTranspose(%t)
      ]]></programlisting>
    </refsection>
    <refsection>
        <title>History</title>
        <revhistory>
            <revision>
                <revnumber>5.5.0</revnumber>
                <revremark>
                    Function introduced. Based on the 'JIMS' module. The main difference in the behavior compared to the JIMS module is that <link linkend="jautoUnwrap">jautoUnwrap</link> is enabled by default.
                </revremark>
            </revision>
        </revhistory>
    </refsection>
</refentry>

