GUIDE in MATLAB

前端 未结 1 922

I am trying to build a program in MATLAB and I am using edit boxes but I want the value that the user will enter to be used later on from another function. So should I use the

1条回答
  •  别那么骄傲
    2021-01-25 19:27

    If you want to store data within a Matlab-GUI, you can use the handles-structure like this:

    handles.myVar=123;
    %after this dont forget to save it (yes, this is a bit annoying):
    guidata(hObject, handles);
    

    later on, within another callback for example, you can find this data within the handles-struct:

    handles.myVar
    

    0 讨论(0)
提交回复
热议问题