Simulink Code Generation for mathematical funktions

Hi everybody,
I have to generate C Code from Simulink Model, I've started with simple Models. But unfortunately I couldn't see my desired result...
I put simply a constant as a Input and a display block as a Output. then in a Atomic Subsystem with a Gain block I multiply the input Value, and as a Result I see the answer in Display, this system works like a charm of course !
But if I generate it to C-Code, in C-script I cant see any mathematical function neither multiply nor my inputs/outputs.
I guess, I have to chance some parameters in properties, but for example just for this example what kind of target files or parameters should I choose ? thank you all...
Best regards, Onur

1 件のコメント

Chandrasekhar
Chandrasekhar 2014 年 5 月 20 日
can you attach the model that you have developed

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

 採用された回答

Onur Isbecer
Onur Isbecer 2014 年 5 月 20 日

0 投票

Hi,
thanks for the attached file. after the work I`m gonna try it,

その他の回答 (2 件)

Onur Isbecer
Onur Isbecer 2014 年 5 月 20 日

0 投票

Hey Askhata !
thanks for the reply, here is the Model. A simple one, but as I said, I want to see exactly my inputs and outputs in C-Skript
Chandrasekhar
Chandrasekhar 2014 年 5 月 20 日
編集済み: Chandrasekhar 2014 年 5 月 20 日

0 投票

Hi Onur, please find the attached model. i have modeled your requirement. generate the code for this model. check out the 'MathOperation' function in Codegen_example.c. this is the C code for the developed model you can find the math operation being done in this function

カテゴリ

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

製品

質問済み:

2014 年 5 月 20 日

回答済み:

2014 年 5 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by