Uploading multiple matfiles from same folder.

1 Ansicht (letzte 30 Tage)
Muhammad Haziq
Muhammad Haziq am 22 Mai 2019
Kommentiert: Muhammad Haziq am 23 Mai 2019
Hi,
I want to upload multiple .mat files from a folder and want to save their data in variables. can any body guide me how can I do that. The initial names of the .mat files are different but last name is same.
  1 Kommentar
Luis J Gilarranz
Luis J Gilarranz am 22 Mai 2019
Is there any pattern in the names? Could you edit the question with 5 file names or so?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

KALYAN ACHARJYA
KALYAN ACHARJYA am 22 Mai 2019
Bearbeitet: KALYAN ACHARJYA am 22 Mai 2019
Make folder as currnt working directory
list=dir('*.mat');
for j=1:length(list)
matfile=load(list(j).name);
% do operation....one and next loop iterattion it load other
end
or if you want to load all mat files as cell array
use
matfile{j}=load(list(j).name);

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by