2
我认为它应该非常简单,我想要做的事情,基本上我有一个编辑框以百分比显示一个值,另一个我想要更新以显示原始值。我已经使用EDIT1(百分比)在下列代码回调尝试:动态更新Matlab GUI中的文本
currentKey = str2num(get(gcf,'CurrentKey'));
percent = str2num(get(handles.edit1,'String'));
if ~isnan(currentKey) && ~isnan(percent) && 0<=percent && percent<=100
set(handles.edit2,'String',num2str(2*percent))
end
但如果我先单击第1之外,只会更新第二个编辑框。任何人都知道我应该做什么?
谢谢!