Why eval in GUI does not execute?
显示 更早的评论
I am new to GUI design and coding. I have the following in my code but when I fill in my edit text box with a command
im2bw(im);
it does not run when I hit the button. I double-checked the pushbutton tag and it is correct.
function pushbutton8_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global im
s = get(handles.edit1,'string');
eval(s)
axes(handles.axes1);
imshow(im);
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!