How to save a table as a CSV in a folder within the directory
Show older comments
How do i save a table from my workspace as a .csv within my directory, inside a subfolder, so that I can call on it later in my script?
Answers (1)
writetable(T,'subfolder/myData.csv','Delimiter',',')
if 'subfolder' doesn't already exist, you may need to make it:
mkdir('subfolder')
later, you can load with:
T = readtable('subfolder/myData.csv');
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!