error in displaying image

7 visualizaciones (últimos 30 días)
kash
kash el 2 de Mayo de 2012
I have a code
function pbRecognize_Callback(hObject, eventdata, handles)
% hObject handle to pbRecognize (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
charvec = handles.charvec;
selected_net = get(handles.editNN,'string');
selected_net = evalin('base',selected_net);
result = sim(selected_net,charvec);
[val, num] = max(result);
set(handles.editResult, 'string',num);
i tried sing the code without using GUI BUT I GET ERROR ,UNDEFINED VARIABLE selected_net
PLEASE HELP

Respuestas (1)

Image Analyst
Image Analyst el 2 de Mayo de 2012
Why do you have this line:
selected_net = evalin('base',selected_net);
when you've just retrieved it from the "editNN" edit text box? Where is selected_net supposed to originate? Also, I don't see where it's trying to display an image (no image(), imagesc() or imshow()). Did you modify the downloaded code in any way? Did you try to contact the author?

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by