Problems obtaining the excel file data output

This is my first time using Matlab. I am trying to run a script written by a brilliant team from Columbia University that was designed to examine the gait parameters in freely walking mice (The MouseWalker). When I run the script, this successfully plot the individual gait features of each mouse, however, it fails in creating the excel sheet containing the data (see below). I have tried different versions of Matlab (2013a, 2013b and 2018b), and remove any add in within excel that may potentially preclude the creation of the Excel sheet. I would greatly appreciate any help to fix this issue.
Error using xlswrite (line 192) An error occurred on data export in CSV format.
Error in MouseEvaluate>WriteExcel (line 4146) xlswrite(ExcelFileName, Data, SheetName);
Error in MouseEvaluate (line 1655) WriteExcel(ExcelFileName, InfoData,'1.Info_Sheet');
Error in MouseWalker>evaluate_togglebutton_Callback (line 710) MouseEvaluate(handles);
Error in gui_mainfcn (line 95) feval(varargin{:});
Error in MouseWalker (line 28) gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)MouseWalker('evaluate_togglebutton_Callback',hObject,eventdata,guidata(hObject))

7 comentarios

Guillaume
Guillaume el 22 de Oct. de 2018
Unfortunately, your error message is not enough to know the cause of the problem. However, since it appears that the code attempts to write a csv file, not an excel file, there is little point in using excel to write the file. Probably the easiest would be to replace the xlswrite call by a call to writetable, after converting data to a table.
What is the type of data?
Aldrin Molero
Aldrin Molero el 22 de Oct. de 2018
The script examine the heat-map impressions left by each mouse paw while walking through a catwalk. These impression are recorded with a high speed camera, and thereafter, the video file rendered to individual frames.
That's not what I asked. There is a variable data in the call to xlswrite at line 4146. What is its type? The easiest way to find out is to put a breakpoint on line 4146, run the code and when it breaks into the debugger, type:
class(data)
size(data)
and tell us the result.
Aldrin Molero
Aldrin Molero el 22 de Oct. de 2018
I got:
Undefined function or variable 'data'.
Aldrin Molero
Aldrin Molero el 22 de Oct. de 2018
By the way, line 4146 is: xlswrite(ExcelFileName, Data, SheetName);
Well, obviously it should be Data with a capital D, so:
class(Data)
size(Data)
after you break into the debugger.
Aldrin Molero
Aldrin Molero el 22 de Oct. de 2018
Editada: Aldrin Molero el 22 de Oct. de 2018
For class(Data): ans = 'cell'
While for size(Data): ans = 34 1

Iniciar sesión para comentar.

 Respuesta aceptada

Aldrin Molero
Aldrin Molero el 23 de Oct. de 2018

0 votos

I found the issue. There was nothing wrong with the script, but a problem with excel. The last update of Office left behind the prior version, which prevented matlab to execute the xlswrite command.
In any case, I want to express my thanks to Guillaume for his gracious assistance.

Más respuestas (0)

Productos

Etiquetas

Preguntada:

el 22 de Oct. de 2018

Respondida:

el 23 de Oct. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by