Azzera filtri
Azzera filtri

xlswrite a cell array with single element in each cell

3 visualizzazioni (ultimi 30 giorni)
Jeff
Jeff il 8 Gen 2014
Commentato: Jeff il 10 Gen 2014
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 Commenti
Jeff
Jeff il 8 Gen 2014
Modificato: Jeff il 8 Gen 2014
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 il 10 Gen 2014
Anyone? I'm still trying to find an answer to this question.

Accedi per commentare.

Risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by