Writing multiple structures to user specified excel file

조회 수: 2 (최근 30일)
Ibro Tutic
Ibro Tutic 2016년 4월 5일
댓글: Ibro Tutic 2016년 4월 5일
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
Azzi Abdelmalek
Azzi Abdelmalek 2016년 4월 5일
Can you give an example?
Ibro Tutic
Ibro Tutic 2016년 4월 5일
Sure, they look like this, in general.

댓글을 달려면 로그인하십시오.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 4월 5일
편집: Azzi Abdelmalek 2016년 4월 5일
load Example
v=[struct2cell(Data1.data)]
out=v(:,:)'
xlswrite('file.xlsx',out)
  댓글 수: 18
Azzi Abdelmalek
Azzi Abdelmalek 2016년 4월 5일
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 2016년 4월 5일
Oh that worked! Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by