<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>size</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="size"> size of objects</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>y=size(x [,sel])  </CALLING_SEQUENCE_ITEM>
    <CALLING_SEQUENCE_ITEM>[nr,nc]=size(x)  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>x</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: matrix (including transfer matrix) or list or linear system (<VERB>syslin</VERB>)</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>y</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: <VERB> 1x2</VERB> integer vector or integer number</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>sel</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: a scalar or a character string</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>nr,nc</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: two integers</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <DESCRIPTION_INDENT>
      <DESCRIPTION_ITEM label="Applied to :">
        <SP>a matrix (constant, polynomial, string, boolean, rational)
    <VERB>x</VERB>, with only one lhs argument <VERB>size</VERB>
    returns a <VERB>1</VERB>x<VERB>2</VERB> vector [number of rows,
    number of columns].  Called with LHS=2, returns <VERB>nr,nc</VERB>
    = [number of rows, number of columns].  <VERB>sel</VERB> may be
    used to specify what dimension to get:</SP>
      </DESCRIPTION_ITEM>
      <DESCRIPTION_ITEM label="1 or 'r'">
        <SP>: to get the number of rows</SP>
      </DESCRIPTION_ITEM>
      <DESCRIPTION_ITEM label="2 or 'c'">
        <SP>: to get the number of columns</SP>
      </DESCRIPTION_ITEM>
      <DESCRIPTION_ITEM label="'*'">
        <SP>: to get the product of rows and column numbers</SP>
      </DESCRIPTION_ITEM>
      <DESCRIPTION_ITEM label="Applied to:">
        <SP>a list it returns the number of elements. In this case only   <VERB>y=size(x)</VERB> syntax can be used</SP>
      </DESCRIPTION_ITEM>
      <DESCRIPTION_ITEM label="Applied to:">
        <P>
     a linear system, <VERB>y=size(x)</VERB> returns in <VERB>y</VERB>
     the (row) vector [number of outputs, number if inputs] i.e. the
     dimension of the corresponding transfer matrix. The syntax
     <VERB>[nr,nc]=size(x)</VERB> is also valid (with
     <VERB>(nr,nc)=(y(1),y(2)</VERB>).  If <VERB>x</VERB> is a linear
     system in state-space form, then <VERB>[nr,nc,nx]=size(x)</VERB> 
     returns in addition the dimension <VERB>nx</VERB> of the
     <VERB>A</VERB> matrix of <VERB>x</VERB>.</P>
      </DESCRIPTION_ITEM>
      <DESCRIPTION_ITEM>
        <P>label='Applied to:'&gt; 
    an hypermatrix <VERB> y=size(x) </VERB> returns the vector of
    hypermatrix dimensions. <VERB> [n1,n2,...nn]=size(x) </VERB>
    returns the hypermatrix dimensions. <VERB> ni=size(x,i) </VERB>
    returns the ith dimension and <VERB>size(x,'*') </VERB>
    returns the product of dimensions.</P>
      </DESCRIPTION_ITEM>
    </DESCRIPTION_INDENT>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
[n,m]=size(rand(3,2))
[n,m]=size(['a','b';'c','d'])
x=ssrand(3,2,4);[ny,nu]=size(x)
[ny,nu]=size(ss2tf(x))
[ny,nu,nx]=size(x)
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>length</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>syslin</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
