error in displaying image
조회 수: 7 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Image Analyst
2012년 5월 2일
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?
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!