Writing multiple structures to user specified excel file

2 visualizaciones (últimos 30 días)
I have a variable amount of structures with 4 fields, each containing 1x1 blocks of data. How would I go about writing multiple structures to a user specified excel file?
  2 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 5 de Abr. de 2016
Can you give an example?
Ibro Tutic
Ibro Tutic el 5 de Abr. de 2016
Sure, they look like this, in general.

Iniciar sesión para comentar.

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 5 de Abr. de 2016
Editada: Azzi Abdelmalek el 5 de Abr. de 2016
load Example
v=[struct2cell(Data1.data)]
out=v(:,:)'
xlswrite('file.xlsx',out)
  18 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 5 de Abr. de 2016
You did not look at my code!
out=[]
for i=1:length(data1)
v=[struct2cell(Data(i).data)];
out=[out;v(:,:)'];
end
Ibro Tutic
Ibro Tutic el 5 de Abr. de 2016
Oh that worked! Thank you!

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by