function nof=noFiles(pattern) %% =========================================================================== %noFiles - Count the number of files in the current directory that % contains the pattern. % % Parameter: pattern Pattern to look for % Returns: nof Number of files % % Example(s): % nodiaryfiles=noFiles('diary*'); % totnofiles=noFiles; % %% =========================================================================== %% =========================================================================== % Copyright (C): % 2003-2009 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % Project : FTW's xDSLsimu % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % % CVS: $Id: noFiles.m 752 2009-01-02 13:03:52Z tono $ %% =========================================================================== % Change History % 2003-11-03 (ToNo) Created % 2008-10-09 (ToNo) Made use of octave 3.0's matlab compatibility %% =========================================================================== if nargin<1, pattern='*'; end nof=length(dir(pattern));