Goodmorning everybody. Can you please help me with this problem?
I'm very new to MatLab's app designer and i was asking how i could share a variable in a GUI with a .m file.
In particulare, in the GUI, i have a numeric field and i want to share that value, once it has been insert, with a variable in an .m file; is it possible?
For semplicity, i'll post only the first code lines of th .m file:
clc
close all
clear all
app=Schedule;
tmp=app.Days;
Here the code of the GUI:
properties (Access = public)
Days=0
end
methods (Access = private)
function DaysEditFieldValueChanged(app, event)
value = app.DaysEditField.Value;
app.Days=value;
end
end
Thank you all for your time!
RC
2 Comments
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/504845-how-to-pass-data-from-a-matlab-gui-to-an-m-file#comment_795924
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/504845-how-to-pass-data-from-a-matlab-gui-to-an-m-file#comment_795924
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/504845-how-to-pass-data-from-a-matlab-gui-to-an-m-file#comment_795936
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/504845-how-to-pass-data-from-a-matlab-gui-to-an-m-file#comment_795936
Sign in to comment.