why is this code not working pls help me out
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
function pushbutton1_Callback(hObject, eventdata, handles)
u=get(handles.popupmenu1,'Value');
v=get(handles.popupmenu1,'Value');
if u == 1 && v ==1
x_String = get(handles.edit1,'String');
x_numeric = str2num(x_String);
result = x_numeric*2;
result_String = num2str(result_numeric);
set(handles.text1,'String',result_String);
result_String = num2str(result_numeric);
set(handles.text1,'String',result_String);
elseif v == 2
%stuff here
elseif v == 3
%stuff here
end
2 件のコメント
Image Analyst
2018 年 10 月 12 日
Other than duplicating the last two lines, what doesn't work about it? Do you have an error message? Or it just doesn't do what you want?
Hijab Zainab
2018 年 10 月 12 日
編集済み: Hijab Zainab
2018 年 10 月 12 日
回答 (1 件)
OCDER
2018 年 10 月 12 日
0 投票
Wild solution guess:
Do not start the GUI by double-clicking the .fig file. Instead, start the GUI by running the .m file.
0 件のコメント
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!