Effacer les filtres
Effacer les filtres

xlswrite a cell array with single element in each cell

3 vues (au cours des 30 derniers jours)
Jeff
Jeff le 8 Jan 2014
Commenté : Jeff le 10 Jan 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 commentaires
Jeff
Jeff le 8 Jan 2014
Modifié(e) : Jeff le 8 Jan 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 le 10 Jan 2014
Anyone? I'm still trying to find an answer to this question.

Connectez-vous pour commenter.

Réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by