how can i convert .mat file to .xlsx or .csv including sub fields
Show older comments

Need to extract data fields completly...
Answers (1)
Benjamin Thompson
on 15 Feb 2022
0 votes
Load the MAT file into MATLAB, then use writematrix to write it out to a spreadsheet or CSV file. For more information on writematrix, type "doc writematrix" in MATLAB. Look over the examples included in the documentation.
2 Comments
kiran
on 16 Feb 2022
Benjamin Thompson
on 16 Feb 2022
Your data structure in the MAT file looks very complicated. You should try it out, starting with this initial few lines of code, research how writematrix, structs, and tables work in MATLAB, then ask additional questions to the Community with a detailed description of how the data needs to be organized in Excel.
load B0053.mat
>> T = struct2table(B0053)
T =
table
cycle
____________
1×137 struct
>> T = struct2table(B0053.cycle)
Categories
Find more on Spreadsheets in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!