How to convert structured .mat to .csv

Hi, I need help with converting a .mat file to .csv as I am trying to load them onto Microsoft Azure jupyter script for machine learning. However, my .mat file is in struct format and when I tried using csvwrite, it produced an error "Undefined function 'real' for input arguments of type 'struct'." Are there any ways that I could de-struct my .mat file or any codes that allow me to convert them directly? Thanks

回答 (1 件)

dpb
dpb 2017 年 6 月 4 日

0 投票

Look at
doc struct2cell
If the whole structure is numeric, then (and only then), you can convert it to an array or vector depending on just what the structure itself contains and the size/shape of the various field(s) therein. Would have to know that to go further...

カテゴリ

ヘルプ センター および File ExchangeStructures についてさらに検索

質問済み:

2017 年 6 月 4 日

回答済み:

dpb
2017 年 6 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by