Convert 1*1 struct file into a csv file
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi everyone,
I am new to Matlab. I want to convert the .mat file info a csv file with several columns, so that I can read into dataframe by Python.
It doesn't work with csvwrite command. Can anyone teach me how to do this? Thank you very much! I've attached the .mat file.
댓글 수: 2
Sajid Afaque
2021년 4월 5일
your struct contains main fields inside containing many subfields. what exaclty do you want to store in csv
채택된 답변
Anmol Dhiman
2021년 4월 7일
Hi Xueliu,
The structure that you shared is a nested one. Also you haven't specified the fieldnames that you wish to have in csv file. As the structure is nested , I suggest the best way is to write code for accessing structure elements. For that you can refer to this link.
Hope it helps
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!