Convert a struct with multiple fields into spreadsheet

8 views (last 30 days)
Hi,
I had the struct array seen below and I want to export it in a manner similar to the spreadsheet in the attached picture please. One spreadsheet for each sulci_? variable in the last two lines. You can notice that the list_sulc (seven variables) came out as variable without the lh. or rh suffix seen in the spreadsheet (are actually 14). Thanks.
struct with fields:
options: [1×1 struct]
list_subject: {'103515' '103818'}
list_sulc: {'po' 'sps' 'pocs_s' 'pocs_i' 'ips_v' 'ips_h' 'mcgr'}
sulci_width: [2×14 double]
sulci_depth: [2×14 double]

Answers (1)

KSSV
KSSV on 27 Oct 2022
REad about struct2table. After conversion write it into excel/ spreadsheet using writetable.

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!