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="nfreq">
15
<refname>nfreq</refname>
16
<refpurpose> frequence of the values in a vector or matrix</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>m=nfreq(x)</synopsis>
23
<title>Arguments</title>
28
<para>real or complex vector or matrix</para>
34
<title>Description</title>
36
Frequence of the values in a real or complex vector or a
37
real or complex matrix <literal>x</literal>.
40
For a real or complex vector or a real or complex matrix
41
<literal>x</literal>, <literal>m=freq(x)</literal> returns in the first column of
42
the <literal>size(x,'*')x2</literal> matrix <literal>m</literal> the values of
43
<literal>x</literal> and in the second column of this matrix the
44
frequences of the corresponding values.
47
Note that the <link linkend="tabul">tabul</link> function is more efficient, applies
48
also to vector of strings and returns a sorted <literal>m</literal>.
52
<title>Examples</title>
53
<programlisting role="example"><![CDATA[
15
<refname>nfreq</refname>
16
<refpurpose> frequence of the values in a vector or matrix</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>m=nfreq(x)</synopsis>
23
<title>Arguments</title>
28
<para>real or complex vector or matrix</para>
34
<title>Description</title>
36
Frequence of the values in a real or complex vector or a
37
real or complex matrix <literal>x</literal>.
40
For a real or complex vector or a real or complex matrix
41
<literal>x</literal>, <literal>m=freq(x)</literal> returns in the first column of
42
the <literal>size(x,'*')x2</literal> matrix <literal>m</literal> the values of
43
<literal>x</literal> and in the second column of this matrix the
44
frequences of the corresponding values.
47
Note that the <link linkend="tabul">tabul</link> function is more efficient, applies
48
also to vector of strings and returns a sorted <literal>m</literal>.
52
<title>Examples</title>
53
<programlisting role="example"><![CDATA[
54
54
x=[2 8 0 3 7 6 8 7 9 1]
56
56
]]></programlisting>
58
<refsection role="see also">
59
<title>See Also</title>
60
<simplelist type="inline">
62
<link linkend="tabul">tabul</link>
65
<link linkend="dsearch">dsearch</link>
68
<link linkend="histplot">histplot</link>
58
<refsection role="see also">
59
<title>See Also</title>
60
<simplelist type="inline">
62
<link linkend="tabul">tabul</link>
65
<link linkend="dsearch">dsearch</link>
68
<link linkend="histplot">histplot</link>