<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the Scilab time frequency toolbox.
This file must be used under the terms of the  terms of the GNU General Public License 
as published by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Copyright (c) 1995 Rice University - CNRS (France) 1996.
-->

<refentry xml:id="rot90" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:scilab="http://www.scilab.org"
          xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook">

  <refnamediv>
    <refname>rot90</refname><refpurpose>rotates the given 2-D array  by 90 degrees.</refpurpose>
  </refnamediv>



  <refsynopsisdiv>
    <title>Calling Sequence</title>
    <synopsis>
      y = rot90 (x, k)
    </synopsis>
  </refsynopsisdiv>
  <refsection>
    <title>Parameters</title>
    <variablelist>
      <varlistentry><term>x :</term>
      <listitem><para>a 2D array.</para></listitem></varlistentry>
    </variablelist>
    <variablelist>
      <varlistentry><term>k :</term> <listitem><para>an integer which
      specifies how many 90-degree rotations are to be
      applied.</para></listitem></varlistentry>
    </variablelist>
  </refsection>

  <refsection>
    <title>Description</title>
    <para>
      Return a copy of x with the elements rotated counterclockwise in
      90-degree increments.  The second argument is optional, and specifies
      how many 90-degree rotations are to be applied (the default value is 1).
      Negative values of k rotate the matrix in a clockwise direction.
    </para>
  </refsection>
  <refsection>
    <title>Examples</title>
    <programlisting role="example"><![CDATA[
    A=[1 2 3
    4 5 6
    7 8 9];
    rot90(A) //counterclockwise
    rot90(A,-1)//clockwise
    ]]></programlisting>
  </refsection>



</refentry>
