read data from filenames in dir structure with function
Ältere Kommentare anzeigen
I wish to read data from a series of files in a structure called files
files=dir('data*.txt');
I can read the data within a .m file, but when I try to make this a function, including a filepath, I get the following error:
[data1, data2]=read_datafiles(files,PathName));
??? Undefined function or method 'read_datafiles' for input arguments
of type 'struct'.
I tried the structfun variants, but I'm not getting it.
Akzeptierte Antwort
Weitere Antworten (2)
Roger Ross
am 9 Jun. 2012
0 Stimmen
Roger Ross
am 9 Jun. 2012
0 Stimmen
Kategorien
Mehr zu File Operations finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!