storage of parameters edit fields( numeric) in App designer

1 回表示 (過去 30 日間)
Palma Errico
Palma Errico 2021 年 2 月 22 日
コメント済み: Palma Errico 2021 年 2 月 22 日
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 Center および File ExchangeDevelop 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