filename = fullfile(files(cntfiles).folder, files(cntfiles).name);
[fin, msg] = fopen( filename );
if fin < 0
error('failed to open "%s" because "%s"', filename, msg);
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!