FMU issue while setting parameter

17 次查看(过去 30 天)
Saurabh Dhakate
Saurabh Dhakate 2024-10-28,16:06
回答: Gayatri 2024-10-28,16:11
We have an FMU that imports successfully into Simulink. However, I'm struggling to set parameters from the workspace. I've tried using various Simulink callbacks but it doesn't seem to affect the FMU's parameters. I want to set parameters once at the start of the simulation.

采纳的回答

Gayatri
Gayatri 2024-10-28,16:11
Hi Saurabh,
You can modify the parameters using the following MATLAB commands:
blockPath = 'model_name/block_name';
blockHandle = getSimulinkBlockHandle(blockPath, true);
set_param(blockHandle, 'parameter_name', 'parameter_value');
Please refer the below documentations for 'set_param' and 'getSimulinkBlockHandle' functions:
I hope it helps!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 RF Blockset Models for Transceivers 的更多信息

标签

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by