storage of parameters edit fields( numeric) in App designer

1 Ansicht (letzte 30 Tage)
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?

Akzeptierte Antwort

Mario Malic
Mario Malic am 22 Feb. 2021
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 Kommentar
Palma Errico
Palma Errico am 22 Feb. 2021
thank you very much, I was working in the startupFCN but couldn't solve the problem. Your answer was very helpful

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by