Load a given list of files

9 views (last 30 days)
Paola
Paola on 17 May 2014
Answered: Azzi Abdelmalek on 17 May 2014
Hi, I would like to load several .mat file, located in different folders. So I made a list in a cell vector. But then, I can't load the files:
f1='c:/data/X/fileA.mat';
f2='c:/data/Y/fileB.mat';
list= cell([f1; f2]);
load (list(1));
Any suggestion ? Many thanks

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 17 May 2014
f1='c:/data/X/fileA.mat';
f2='c:/data/Y/fileB.mat';
list={f1, f2};
data=load (list{1})

Tags

Community Treasure Hunt

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

Start Hunting!