Getting CompiledPortDataTypes from within a PostCodeGenCommand

11 ビュー (過去 30 日間)
Traz Daczkowski
Traz Daczkowski 2017 年 12 月 18 日
回答済み: Matthew Rademacher 2023 年 5 月 30 日
I'm tying to get a list of the compiled port data-types from within a function being called by PostCodeGenCommand. get_param(outportlist,'CompiledPortDataTypes')is returning empty cell arrays as though the model were not compiled. If I put the command Model([],[],[],'compile'); into the script I get an error about a recursive function call.
Is there a handle to the compiled model that I should be passing to my PostCodeGenCommand?
  1 件のコメント
Matthew Rademacher
Matthew Rademacher 2023 年 5 月 30 日
I am getting the same problem, six years later

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

回答 (1 件)

Matthew Rademacher
Matthew Rademacher 2023 年 5 月 30 日
in my opinion this is very unsatisfying but it technically works:
set_param(model,'SimulationCommand','start')
set_param(model,'SimulationCommand','pause')
c=get_param(gcbh,'CompiledPortDataTypes')
for some reason you can only get the data types if you are paused in a simulation? seems weird.

カテゴリ

Help Center および File ExchangeEvent Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by