how to define Structure with pointer elements

2 ビュー (過去 30 日間)
Sathishkumar sha
Sathishkumar sha 2014 年 1 月 30 日
回答済み: Walter Roberson 2014 年 1 月 30 日
Hello,
I have a structure like the one below, how do i define Simulink.Bus of such type in my workspace?
Struct sample_type { int32 a; int32 b; int32 *c }

回答 (1 件)

Walter Roberson
Walter Roberson 2014 年 1 月 30 日
Neither MATLAB nor Simulink can handle pointers. If you have somehow gotten a pointer that you do not need to work on at the MATLAB level (except for copying or comparing the pointer itself), then before it reaches the MATLAB level it needs to be converted to a uint64 (probably "unsigned long long" at the C level.)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by