I am wondering how one can save a table using the following
filename_excel = [ name '_N' num2str(1) '.xlsx'];
writetable(Table,filename_excel,'Sheet', 3, 'Range','A5');
to a specific directory/folder other than the current folder?
Change filename_excel to
filename_excel = [my_directory name '_N' num2str(1) '.xlsx'];
where
my_directory = 'C:\some\directory\structure\';
Alternatively (though use the first solution if possible) you can go:
current_dir = cd;
cd my_directory;
filename_excel = [ name '_N' num2str(1) '.xlsx'];
writetable(Table,filename_excel,'Sheet', 3, 'Range','A5');
cd current_dir;
clear current_dir;