xlswrite a cell array with single element in each cell

3 次查看(过去 30 天)
Trying to create an xls spreadsheet using xlswrite in Student Matlab 7.8.0 r2009a. lswrite's help document says that the input matrix can be a cell array "if each cell includes a single element".
I have inherited this code, which is giving me the error "ActiveX - Element of a cell array cannot be a character matrix." while executing 'xlswrite(excelFile, sortedResults,1)'.
sortedResults is a cell matrix but, from the looks of it, has a single element in each cell. It is 16100x18. Three of the columns are chars (a 1x3 char, 1x(varying length) char, 1x5 char). The other 15 are all doubles.
I need help finding a way around this error. Thanks.
  3 个评论
Jeff
Jeff 2014-1-8
编辑:Jeff 2014-1-8
Yes. But first, AN IMPORTANT CORRECTION: The second "char" column is of varying length. That is, it is not always 1x21 char.
I created the attached file using "save sortedResults sortedResults". The file doesn't have a .m or .mat, and my Windows thinks it is an MS Access Shortcut, but I was able to load it correctly ("load sortedResults").
Jeff
Jeff 2014-1-10
Anyone? I'm still trying to find an answer to this question.

请先登录,再进行评论。

回答(0 个)

产品

Community Treasure Hunt

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

Start Hunting!

Translated by