exporting a .mat file to csv/ xls
6 views (last 30 days)
Am new here so this may be a dupe query:
I have a 1X1 struct with 2 fields. 1 field has 2000 values of double and the next one has 10000 values as double.
How do i export this type of data into a spreadsheet/ csv.
i tried using writematrix but it gave me the unsupported type 'struct' error.
Arif Hoq on 31 Mar 2022
you have to extract your data from the struct. here i am giving an example. i have attached a struct
structvalue=load('data2.mat'); % load your struct in matlab
data=structvalue.A % extract your data
writematrix(data,'myfilename.xlsx') % export to excel or csv
% you can use writetable also