How to set input value from GUI into global variable

조회 수: 2 (최근 30일)
Tata
Tata 2016년 1월 26일
답변: Tata 2016년 1월 26일
I am trying to create a configuration panel containing some configurable parameters. The configuration value shall be used in other Matlab functions. But,when I enter the variable name ("Value")to the command window, Matlab notifies the variable is not defined.
function edit1_Callback(hObject, eventdata, handles)
Value = get(handles.edit1,'String');
Value = str2double(Value);
Could you please give me your advise? Many thanks
%

채택된 답변

Tata
Tata 2016년 1월 26일
You can use "uisave" command to save the variable to .mat file. Load the .mat file to use the variable.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Call C++ from MATLAB에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by