Borrar filtros
Borrar filtros

How to count files with specific name?

29 visualizaciones (últimos 30 días)
IGOR RIBEIRO
IGOR RIBEIRO el 31 de Mzo. de 2016
Respondida: Walter Roberson el 31 de Mzo. de 2016
Great friends, I need help. I made a .mat file strut format that lists all my HDF files. These files are a set of data per year. I want to count how many files have to each year. How to make? For example: file = dir ('AIRS *'); length (file ('AIRS.2003 *)) length (file ('AIRS.2004 *)) length (file ('AIRS.2005 *))
Thanks for your help.

Respuesta aceptada

Walter Roberson
Walter Roberson el 31 de Mzo. de 2016
file = dir ('AIRS *');
filenames = {file.name};
num2004 = sum( ~cellfun(@isempty, strfind(filenames, '2004')) )

Más respuestas (0)

Categorías

Más información sobre File Operations en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by