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!

 Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 25 Avr 2016
Modifié(e) : Azzi Abdelmalek le 25 Avr 2016
Name=4205;
writetable(T,sprintf('%d.csv',Name));

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by