How to import multiple .mat files to workspace?
Mostrar comentarios más antiguos
Hi,
As cited above, I'm trying to import multiple .mat files (total 72 no. of .mat files) which are at the location as in the code below. However the code doesn't import the files to the workspace and throws error as below.
files = dir('D:\Rahul\Data_tokamak\data&plot\data_paper1\H-mode data\H-mode bistable model\set1_neoAno_ratio_10\beta0.01\Contourplot\*.mat');
for i=1:length(files)
load(files(i).name,'-ascii');
end
ERROR:
Error using load
with regards,
rc
Respuesta aceptada
Más respuestas (1)
Paul
el 28 de Abr. de 2024
0 votos
Why use the -ascii option to load a .mat file? If that's not the problem, please edit your question by copy/pasting the entire error message.
Depending on what's in the .mat files and how you're planning to process the data, you might want to consider using the output argument of load so that the data from each .mat file is stored in an element of an indexable array.
Categorías
Más información sobre Large Files and Big Data en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!