How can I run many .mat files in loop .?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Yogeshvaran Ramanathapuram Nagarajan
el 8 de Feb. de 2020
Respondida: Stephen23
el 8 de Feb. de 2020
I have more than 30.mat files . I have implemented .mat file from particular folder. I am getting plot if I add exact 'filename' instead of 'current_file'. I need to compare among many .mat files yet I am getting as unrecognized filename..
for i=2
current_file = filenames{i}
load('current_file')
..........
.........
end
0 comentarios
Respuestas (1)
Stephen23
el 8 de Feb. de 2020
How to process multiple files is explained in the MATLAB documentation:
Probably the dir-based approach would be more suitable for your task.
Note that to trivially avoid some basic bugs you should always load into an output variable:
S = load(...)
0 comentarios
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!