Read mat files from a custom function
Mostrar comentarios más antiguos
Hello,
Please help me with the following:
I need to create a function (m.file) that reads automatically mat files with different names.
For example,
Consider these mat files:
Day1_hour1.mat
Day1_hour2.mat
.
.
.
Day2_hour1.mat
Day2_hour2.mat
etc.
The function that I need should be like this:
function data=LoadData(n,m)
data=load('Dayn_hourm');
end
So for example, if I want to load
Day10_hour23
I would call
LoadData(10,23)
Thank you.
Best,
Pavlos
1 comentario
per isakson
el 14 de Feb. de 2017
What do the mat-files contain? An identical set of variables?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Workspace Variables and MAT Files en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!