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 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