Borrar filtros
Borrar filtros

how to extraxct data from indexed mat files

1 visualización (últimos 30 días)
Ahmed Elsayed
Ahmed Elsayed el 29 de Jun. de 2015
Comentada: Walter Roberson el 29 de Jun. de 2015
Hello, I have high number of mat files generated by a system which indexed them. I have files (test1.mat, test2.mat,...test1000.mat) I need to run a loop to extract data from certain variables in these files and process them.

Respuestas (1)

Walter Roberson
Walter Roberson el 29 de Jun. de 2015
  1 comentario
Walter Roberson
Walter Roberson el 29 de Jun. de 2015
You want to process a sequence of files and that shows you how to process a sequence of files.
for K = 1 : 1000
filename = sprintf('test%d.mat', K);
data = load(filename);
disp(size(data.VariableName)); %do something with the data fetched from the file saved as VariableName
end

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by