Error while reading file / UI Control Callback

I'm trying to update a MATLAB program that was written in 2010 and I'm having some issues that I think are related to running code meant for an older version on 2018a, but I'm not sure how to fix the problem.
This is the error message I'm getting:
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)rocgui('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
This is the code it's related to:
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Display surf plot of the currently selected data.
handles.rocmatrix = uiimport; %this initializes the global matrix\
% Update handles structure
handles.roc = roc_processor(handles,1);
handles.current_data=handles.roc;
plot(handles.current_data);
axis([0 1 0 1])
guidata(hObject, handles);
Anyone have any insights?

3 comentarios

Geoff Hayes
Geoff Hayes el 18 de Mayo de 2018
Do you know which line of code in the above callback is causing the error? If you don't, just comment each line (one at a time) until you find the culprit.
Walter Roberson
Walter Roberson el 18 de Mayo de 2018
One thing to watch out for is that uiimport of text now returns string objects by default instead of cell array of character vectors.
I suspect that your difficulty might be in roc_processor but that you did not show a complete callback.
ValentineWiggins
ValentineWiggins el 21 de Mayo de 2018
Thank you! This makes sense and I think is the issue.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Entering Commands en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 18 de Mayo de 2018

Comentada:

el 21 de Mayo de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by