How to use the pointers in the stateflow ?

18 ビュー (過去 30 日間)
Dileep MD
Dileep MD 2019 年 1 月 7 日
編集済み: Muthukumar Ganesan 2022 年 7 月 27 日
Hi
I am creating a function for the code generation using the targetlink . The aguments to the function are 1) non-constant, call-by-value (Normal Varlable)
2) non-constant, call-by-reference (Pointer variable)
These two inputs will be passed to the stateflow chart and and in the chart, Pointer variable will be assigned by a constant value.
When designed the stateflow like this, and run the model, the following error will appear: Chart Input data 'Pointer variable' on left hand side of an expression.
Please help me out to solve this problem.
With Regards
Dileep

回答 (1 件)

Muthukumar Ganesan
Muthukumar Ganesan 2022 年 7 月 27 日
編集済み: Muthukumar Ganesan 2022 年 7 月 27 日
Hi,
Stateflow doesn't support writing pointer variables, you have to use Custom C code. Please refer to the sample model here.
Thanks.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by