How to prevent MATLAB Coder from breaking up input structures

10 ビュー (過去 30 日間)
Paul Silversmith
Paul Silversmith 2020 年 6 月 15 日
編集済み: Anmol Dhiman 2020 年 6 月 30 日
MATLAB Coder will sometimes treat a subset of the fields of an input structure as individual inputs. How can I direct MATLAB Coder to always pass the entire structure?
e.g.
struct.A = 1; struct.B = 2; struct. C = 3
[output] = myfunction(struct)
MATLAB Coder will sometimes generate code as follows:
[output] = myfunction(struct_A,struct_B)

採用された回答

Anmol Dhiman
Anmol Dhiman 2020 年 6 月 23 日
編集済み: Anmol Dhiman 2020 年 6 月 30 日
Hi Paul,
This is an optimization that occurs by default when generating code and may be disabled in certain circumstances. To determine whether this will work for you, please reach out to MathWorks technical support.
Regards,
Anmol Dhiman

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by