13
13
<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="firstnonsingleton">
15
<refname>firstnonsingleton</refname>
16
<refpurpose>Finds first dimension which is not 1</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>[dim]=firstnonsingleton(A[,opt])</synopsis>
23
<title>Arguments</title>
28
<para>first dimension of A which is not 1</para>
34
<para>a variable of any Scilab data type</para>
40
<para>a character string giving the type of output we want</para>
45
<para>returned value is a numerical value</para>
51
<para>returned value is a character string if possible ("r" instead of 1 and "c" instead of 2)</para>
60
<title>Description</title>
62
This function is used by <literal>mfile2sci</literal> to emulate Matlab behavior under Scilab, particularly
63
for functions which treat the values along the first non-singleton dimension of A in Matlab
64
while in Scilab they treat all values of A.
68
<title>Examples</title>
69
<programlisting role="example"><![CDATA[
15
<refname>firstnonsingleton</refname>
16
<refpurpose>Finds first dimension which is not 1</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>[dim]=firstnonsingleton(A[,opt])</synopsis>
23
<title>Arguments</title>
28
<para>first dimension of A which is not 1</para>
34
<para>a variable of any Scilab data type</para>
40
<para>a character string giving the type of output we want</para>
45
<para>returned value is a numerical value</para>
51
<para>returned value is a character string if possible ("r" instead of 1 and "c" instead of 2)</para>
60
<title>Description</title>
62
This function is used by <literal>mfile2sci</literal> to emulate Matlab behavior under Scilab, particularly
63
for functions which treat the values along the first non-singleton dimension of A in Matlab
64
while in Scilab they treat all values of A.
68
<title>Examples</title>
69
<programlisting role="example"><![CDATA[
73
73
// Matlab max emulation
74
74
M = max(A,firstnonsingleton(A))
75
75
]]></programlisting>