フィルターのクリア

how to set 'Fixed-step size' specified in the Configuration Parameters dialog for block diagram in a simulink model from a GUI

21 ビュー (過去 30 日間)
I am trying to run a simulink model using GUI. I have declared the configuration parameter 'Fixed-step size' as a variable "Ts" in the simulink model. While running the simulink file from the GUI, I am getting the following error: | Error evaluating expression 'Ts' for 'Fixed-step size' specified in the Configuration Parameters dialog for block diagram 'sdm_maha': Undefined function or variable 'Ts'.| I am using the _ sim('sdm_maha');_ to run the simulink model. Can anyone help me how to how to set 'Fixed-step size' specified in the Configuration Parameters dialog for block diagram in a simulink model from a GUI ??

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2016 年 9 月 20 日
You need to set a value for the variable 'Ts' in the base workspace.
assignin('base','Ts',0.01)
  1 件のコメント
OLUWASEUN ADEKOYA
OLUWASEUN ADEKOYA 2022 年 9 月 2 日
Yes, I just had to do this within the spmd block since each worker needs to be able to access this "Fixed Step Size" this in their base workspace as well.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by