What is the different between int_T in matlab S-function or mexfunction and int_t in C?

5 ビュー (過去 30 日間)
I am currently learning both C++ and matlab S-Function and these alike yet different data types confuse me.

採用された回答

Prashant Arora
Prashant Arora 2017 年 10 月 18 日
int_T, real_T (upper case T) are data types used by MATLAB and Simulink and are defined in shipped file "tmwtypes.h". They prove more flexibility in terms of platform dependency. For example real_T can switch types for 32 or 64 bit systems. To define a custom S-Function in C, you need not use any of these data types and can use standard ones like int, double etc.
I think you can also use int_t (small case t) in your code as long as those definitions are provided to MATLAB.
  1 件のコメント
Syarif Hidayatullah
Syarif Hidayatullah 2017 年 10 月 18 日
Thank you! And no, I can not use the int_t and real_t in the S-function. Tried it. I think it's because it's been redefined in "tmwtypes.h"

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBlock and Blockset Authoring についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by