storage of parameters edit fields( numeric) in App designer

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?

 Respuesta aceptada

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 comentario

thank you very much, I was working in the startupFCN but couldn't solve the problem. Your answer was very helpful

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.

Productos

Versión

R2020a

Etiquetas

Preguntada:

el 22 de Feb. de 2021

Comentada:

el 22 de Feb. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by