回复: 求助:如何编写可接受输入的编辑框
你的程序是哪里得到的?或者说是哪个年代的书上写的?现在的GUI编程很方便的,在界面放上个编辑框,在它的callback函数里用str2double就可以了,如:
function edittext1_Callback(hObject, eventdata, handles)
user_entry = str2double(get(hObject,'string'));
if isnan(user_entry)
errordlg('You must enter a numeric value','Bad Input','modal')
end
__________________
工科'985'博士,(图像处理、分析及理解;模式识别;运动估计;数据分析等)定做程序、算法实现--qq:752105755
|