How to open file array with fopen?
Show older comments
Hi, I have a list of files that look like this:
J={'File1', 'File2', 'File3'}
It is not possible to open the file using fopen this way:
for i=1:length(J)
fid=fopen('J(1)', 'r')
%Some algorithms here...
fclose(fid)
end
Is there any possible way to use fopen by using looping? It seems like it only accepts the actual file name. Please help. Thanks!
Accepted Answer
More Answers (1)
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!