Save a Table as a .csv in a Specified Folder
조회 수: 71 (최근 30일)
이전 댓글 표시
Hello,
Here is the code I have:
save_table ='C:\Users\Folder Path\Data';
table_path_format = [save_table 'Name_of_File.csv'];
writetable(T,table_path_format);
where T is a 90 x 8 table.
Am I skipping a step?
Thanks.
댓글 수: 0
채택된 답변
Adam Danz
2022년 11월 8일
편집: Adam Danz
2022년 11월 8일
The accepted answer in the question you followed uses fullfile to construct the file path. That's much safer than constructing the file path by concatenating char vectors (like you're doing). Your table_path_format is missing a file separator character. fullfile adds that for you.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!