How to save a table as a CSV in a folder within the directory

조회 수: 10 (최근 30일)
new2matlab
new2matlab 2020년 2월 19일
편집: Sindar 2020년 2월 19일
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?

답변 (1개)

Sindar
Sindar 2020년 2월 19일
편집: Sindar 2020년 2월 19일
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');
though it may be necessary to set certain options (see readtable documentation)

카테고리

Help CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by