Passing variable from MATLAB APP Designer Edit Field to a variable inside a .m file.
37 views (last 30 days)
Currently I am able to create a GUI in the Matlab App Designer and I want to connect some of the input edit field value to some variable inside a .m file. How do I do that?
function x_valueEditFieldValueChanged(app, event)
value = app.x_valueEditField.Value;
want the variable x to be what the user input to be
More Answers (2)
Vijay on 14 Nov 2022
You can use ‘load’ function to load your desired variable from a matfile into workspace or a structure.
Here is more info on ‘load’ function Load variables from file into workspace - MATLAB load - MathWorks India.
S = load("matlab.mat"); %S is a structure
app.EditField.Value = S.myVar;
Hope this helps!