How to write customer struct in TLC file for inline SFunction C++?

I have already rebuilt my C++ code in SFunction, and use "mex xxxxxx.cpp xxxxx.cpp " to run normal.
Next, I want to transform this SFunction to inline SFunction, and meet some problems.
In my code, I use
"typedef struct
{
}PIDController;
"
A customer struct, and work well.
Now, I want to use it in tlc file, how to do it?
Thank you all!!!

3 件のコメント

sy
sy 2024 年 5 月 31 日
Additional, this struct is init in mdlstart, and update in mdloutput.
sy
sy 2024 年 6 月 1 日
HelHeSSSSS
sy
sy 2024 年 6 月 1 日
Hello everyone, this is a simple PIDController S-Function, work well in mex and cannot work in inline mode.
Maybe there is some mistake in mine tlc file, can someon help me?

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

 採用された回答

sy
sy 2024 年 6 月 2 日

0 投票

I have done it.
Hope this could help someone.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink Coder についてさらに検索

製品

リリース

R2022a

質問済み:

sy
2024 年 5 月 31 日

回答済み:

sy
2024 年 6 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by