フィルターのクリア

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 Center および File ExchangeModeling についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by