matlab - Save output to another directory when output was made with cell2csv -
i using fileexchange code cell2csv save cell in code. i'd output file, csv file, saved different directory. how can done?
here's current code saving cell:
cell2csv([fname(13:16), '-', u_id{k}, '_24hrblkavg.csv'], site_data, '\t'); % cell2csv(filename,cellarray,delimiter)
you can use fullfile
construct path in system-independent way
%// not put in 1 line, code should readable human: filename = [fname(13:16), '-', u_id{k}, '_24hrblkavg.csv'] filepath = fullfile(beetroot_folder, daughter_folder, subsubfolder, filename) cell2csv(filepath, site_data, '\t');
if need save in subfoder, use '.'
current folder, or saving in sister folder use '..'
parent folder:
filepath = fullfile('.', filename)
Comments
Post a Comment