Difference between S function and MATLAB Function?

50 ビュー (過去 30 日間)
Muhammad Ahsan Zamee
Muhammad Ahsan Zamee 2019 年 2 月 28 日
コメント済み: Walter Roberson 2019 年 3 月 1 日
Hello
I would like to know whats the difference between Matlab function and S function? Can I use any of them for any system? What is the necessity of using S functions over Matlab functions (the cases)?

回答 (1 件)

Raj
Raj 2019 年 3 月 1 日
編集済み: Raj 2019 年 3 月 1 日
Hello,
MATLAB function or User defined function allows you to write your own function in MATLAB language. This is basically used in Simulink where using inbuilt blocks complicates the model. S function block on the other hand allows you to integrate an executable version of your code in other high level programming languages line C,C++,Digital FORTRAN etc into simulink. You need to have a compiler for respective language. For example the MING compiler works perfectly for integrating Fortan code into Simulink.
  3 件のコメント
Raj
Raj 2019 年 3 月 1 日
Can you please elaborate a little bit? Thanks in advance.

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by