Hi. I need to convert some .mat files contained in a folder to csv with a for loop. What is the best way to do it?

댓글 수: 3

KSSV
KSSV 2022년 10월 10일
It depends on what data mat files has.
John
John 2022년 10월 10일
They are struct with fields:
labelNames: [15×5 table]
Davide Masiello
Davide Masiello 2022년 10월 10일
Maybe best to share the .mat file

댓글을 달려면 로그인하십시오.

답변 (1개)

Ghazwan
Ghazwan 2022년 10월 10일
편집: Ghazwan 2022년 10월 10일

0 개 추천

xlswrite('MyFile.csv',X,1);
X = is the matrix you are trying to save. 1 is the number of sheet.

댓글 수: 1

John
John 2022년 10월 10일
Thank you for the help. But what I need is to convert n tables (contained in a folder) to n csv files with a for loop (at every iteration I want to produce a csv file with different name from the previous one: file1.csv, file2.csv, file3.csv,...)

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Tables에 대해 자세히 알아보기

태그

질문:

2022년 10월 10일

댓글:

2022년 10월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by