It would be helpful to know what ‘not working’ actually means.
Assuming that ‘filelist’ is a cell array, perhaps:
filename = filelist{i,:};
would work.
Note — Curly brackets {} indicating indexing into the content of the cell array.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!