Using variable value to name a folder

hi, i have a variable called Name in workspace and would like to save a table to csv using the Name value. Example: Name=4205; writetable(T,?????);
name of output file should be 4205.csv
thanks!

 Accepted Answer

Name=4205;
writetable(T,sprintf('%d.csv',Name));

More Answers (0)

Categories

Asked:

on 25 Apr 2016

Commented:

on 25 Apr 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!