passing parameter values beween a GUI and other scripts
4 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to built a GUI (desigend in appdesigner matlab 2020a) to collectuser input data from a scritp to execute calculations, however it is unclear how to get the user input into the workspace. I did declare the variables to have Access = public:
properties (Access = public)
Roi_cam1;
Roi_cam2;
Roi_cam3;
XY_cam1;
XY_cam2;
XY_cam3;
Cal_cam1; % Description
Cal_cam2;
Cal_cam3;
videoName_cam1;
videoName_cam2;
videoName_cam3;
shape;
disch;
Circ;
Exp_name;
Directory;
end
The matlab documentation is not exactly very clear on the topic of getting data in and out of a GUI. Any help is welcome
kind regards
Francois Clemens
0 件のコメント
回答 (1 件)
Saurabh
2024 年 5 月 14 日
Hi Francois,
It seems like you are trying to export the parameter values between the GUI and another workspace, say the base workspace.
One method that I am aware of is using the ‘assignin’ function, which assigns value to a variable in a specified workspace.
The syntax goes as follows:
assignin(ws,var,val) % assigns the value val to the variable var in the workspace ws.
For example, assignin('base','x',42) assigns the value 42 to the variable x in the MATLAB base workspace.
For more information about the function ‘assignin’ refer to this link:
Regards,
Saurabh
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!