You cannot use csvwrite() or dlmwrite() to selectively overwrite columns. You would need to use xlswrite() or writetable() to selectively overwrite columns.
If you are just trying to create a new file with those entries as the only content, then the easiest way is to do it "manually". No loop is required:
fid = fopen('Myfile.csv', 'wt');
[~, f_names] = cellfun(@fileparts, {Imgs.name}, 'uniform', 0);
fprintf(fid, '%s\n', f_names{:});
fclose(fid);
0 Comments
Sign in to comment.