Assign values to an "Editor Text" box using manual input or a push button
古いコメントを表示
I want to allow user to insert different numbers in an editor text box to be used further in the code. But I also want to add a push button to restore a default value to that parameter (and show that number in the edit text box) when needed. How can I do this? My callback functions are as follows.

function GLP_fsize_val_Callback(hObject, eventdata, handles)
handles.GLP_fsize_val=str2double(get(hObject,'String'));
guidata(hObject, handles);
[similar function for sigma]
function Default_GLF_Callback(hObject, eventdata, handles)
set(handles.GLP_fsize_val,'string',handles.defaults.GLP_fsize_val);
set(handles.GLP_sigma_val,'string',handles.defaults.GLP_fsize_val);
guidata(hObject, handles);
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!