convert 1x1 struct mat file to xlsx

my sample.mat file has the following 1x1 structure, I need script to convert this mat file into an excel file.

2 Comments

Why you want it in xlsx? You have it in .mat file already.
For some confined reasons, i need it in xlsx

Sign in to comment.

Answers (1)

ES
ES on 28 Mar 2017
First get all members of the structure using fields command.
Then iterate over the structure and write values in the excel sheet using xlswrite
If you encounter a structure of structure, do the fields again [recursive].

Tags

Asked:

on 27 Mar 2017

Answered:

ES
on 28 Mar 2017

Community Treasure Hunt

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

Start Hunting!