Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Português - 日本語

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
However, this page did not exist in the previous stable version.

Aide Scilab >> Statistiques > nfreq


frequence of the values in a vector or matrix

Calling Sequence




real or complex vector or matrix


Frequence of the values in a real or complex vector or a real or complex matrix x.

For a real or complex vector or a real or complex matrix x, m=freq(x) returns in the first column of the size(x,'*')x2 matrix m the values of x and in the second column of this matrix the frequences of the corresponding values.

Note that the tabul function is more efficient, applies also to vector of strings and returns a sorted m.


x=[2 8 0 3 7 6 8 7 9 1]

See Also

  • tabul — frequency of values of a matrix or vector
  • dsearch — search in ordered sets
  • histplot — dessine un histogramme


Carlos Klimann

Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Mar 03 11:00:12 CET 2011