Building Simevents model with Matlab code. Setting the output switch 'number of ports' parameter.
3 ビュー (過去 30 日間)
古いコメントを表示
Hello, I am trying to build a simevents model using matlab code since it's a big and complex model and is more accurate and quicker to proceed this way.
I am having a problem setting the parameter for the entity output switch regarding the number of ports. When i call the parameter 'ports' in the add_block command, the system returns an error saying that this parameter is read only.
Do you know any way I could get around this?
this is what I m writing:
add_block('built-in/entityoutputswitch',[sys '/os'],'Position',pos,'outputports','70')
and this is what I get:
Error using model (line 53)
EntityOutputSwitch block parameter 'OutputPorts' is read-only
0 件のコメント
採用された回答
Krishna Akella
2018 年 12 月 13 日
Hi Marco,
If you are trying to set the 'Number of output ports', have you tried the following instead:
add_block('built-in/entityoutputswitch',[sys '/os'],'Position',pos,'NumberOutputPorts','70')
You can see all the dialog parameters available for the block using the following:
>> get_param(gcb, 'DialogParameters')
ans =
struct with fields:
NumberOutputPorts: [1×1 struct]
SwitchingCriterion: [1×1 struct]
Seed: [1×1 struct]
SwitchAttributeName: [1×1 struct]
InitialPortSelection: [1×1 struct]
- Krishna
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Discrete-Event Simulation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!