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 argumentsof type 'struct'.
I tried the structfun variants, but I'm not getting it.
Best Answer