Convert .mat files to csv

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 ExchangeTables についてさらに検索

タグ

質問済み:

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