storage of parameters edit fields( numeric) in App designer

1 次查看(过去 30 天)
I have a file where I have stored numeric parameters ('parameters.mat').
My app needs to read the parameters from the 'parameters.mat' file and must associate them with some edit fields (numeric) of App designer .
How can i do this?

采纳的回答

Mario Malic
Mario Malic 2021-2-22
Hello again,
You can use load function to load the file in startupFcn, an example:
function startupFcn(app)
data = load('parameters.mat');
% data is a struct with fields named by variables in your file
app.EditField.Value = data.VariableName;
end
  1 个评论
Palma Errico
Palma Errico 2021-2-22
thank you very much, I was working in the startupFCN but couldn't solve the problem. Your answer was very helpful

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by