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

Guillaume
Guillaume 2018년 10월 22일
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?
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.
I got:
Undefined function or variable 'data'.
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 2018년 10월 22일
편집: Aldrin Molero 2018년 10월 22일
For class(Data): ans = 'cell'
While for size(Data): ans = 34 1

댓글을 달려면 로그인하십시오.

 채택된 답변

Aldrin Molero
Aldrin Molero 2018년 10월 23일

0 개 추천

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.

추가 답변 (0개)

카테고리

제품

태그

질문:

2018년 10월 22일

답변:

2018년 10월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by