필터 지우기
필터 지우기

Set a variable in Simulink workspace from App Designer

조회 수: 2 (최근 30일)
Aymeric Pasquier
Aymeric Pasquier 2024년 1월 23일
답변: Walter Roberson 2024년 1월 23일
Hello, I have a Simulink model to simulate a solar power plant with a battery. This model uses a variable named "battery_capacity". I want to create an app with App Designer to set the inputs of the model and have an overlook of the outputs.
But somehow I can't manage to run
sim('power_plant.slx')
with my variable updated to the the value of
app.BatteryCapacityEditField.Value
I tried a lot of things but I can't find the righgt way of doing it. Can someone help me ?

채택된 답변

Walter Roberson
Walter Roberson 2024년 1월 23일
assignin('base', 'battery_capacity', app.BatteryCapacityEditField.Value);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by