Load a given list of files

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)

f1='c:/data/X/fileA.mat';
f2='c:/data/Y/fileB.mat';
list={f1, f2};
data=load (list{1})

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Asked:

on 17 May 2014

Answered:

on 17 May 2014

Community Treasure Hunt

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

Start Hunting!