Borrar filtros
Borrar filtros

xlswrite a cell array with single element in each cell

3 visualizaciones (últimos 30 días)
Jeff
Jeff el 8 de En. de 2014
Comentada: Jeff el 10 de En. de 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 comentarios
Jeff
Jeff el 8 de En. de 2014
Editada: Jeff el 8 de En. de 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 el 10 de En. de 2014
Anyone? I'm still trying to find an answer to this question.

Iniciar sesión para comentar.

Respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by