MATLAB Answers

Translated by

このページのコンテンツは英語から自動翻訳されています。自動翻訳をオフにする場合は「<a class="turn_off_mt" href="#">ここ</a>」をクリックしてください。

0

Export Data from a Structure which contains double timeseries data to Excel ... Example Data Provided...

Aqib Idrees さんによって質問されました 2017 年 10 月 17 日
最新アクティビティ Berkin Birol さんによって コメントされました 2018 年 12 月 30 日
Hello,
I have:
Struct named 'CarData', contains double timeseries fields, named 'Left' and 'Right' each has with 20 columns and over 10-20,000 rows.
I wish to run a script to export CarData.Left into an new Excel sheet (xlswrite('something.xlsx'), I've read various pages of help and am struggling to address the data fields inside as well as extracting all 20 columns.
Can someone please facilitate, having the field names if of no importance. I only need the numerical data without concatenating vertically/horizontally.
Here are some of the pages I've looked into: https://uk.mathworks.com/matlabcentral/answers/278751-how-to-extract-data-from-structure-efficiently https://uk.mathworks.com/matlabcentral/fileexchange/22510-struc2xls https://stackoverflow.com/questions/25948371/how-to-write-a-structure-to-excel-in-matlab struct2cell etc
I'm in need to do with without the use of plug-ins, I've attached an example version of the MATLAB struc to help understand what I have.

  0 件のコメント

サインイン to comment.

1 件の回答

回答者: Cedric Wannaz
2017 年 10 月 17 日
編集済み: Cedric Wannaz
2017 年 10 月 17 日
 採用された回答

Here is one way if you want to create two worksheets "Left" and "Right" in the same workbook, with 21 column per sheet for time and data:
xlswrite( 'CarData.xlsx', [CarData.Left.Time, CarData.Left.Data], 'Left' ) ;
xlswrite( 'CarData.xlsx', [CarData.Right.Time, CarData.Right.Data], 'Right' ) ;

  2 件のコメント

Is this answer working for you? If so please [Accept] it. If not, I am happy to provide more information.
Thank you for the solution, it worked for me too. Finally I don't hate timeseries in MATLAB anymore :)

サインイン to comment.



Translated by