MATLAB Level 2 S Function tutorial?

6 ビュー (過去 30 日間)
Danylo
Danylo 2015 年 2 月 20 日
回答済み: Abhishek GS 2015 年 4 月 10 日
Hello, I'm looking for a step-by-step tutorial constructing a level-2 MATLAB .m S-function with continuous states, so derivatives that need to be updated at each time step. This is easy for level-1 S-functions, but level-2 S-function seem like alien language to me. Any good tutorials? Thank you!
  1 件のコメント
KSevcik
KSevcik 2015 年 3 月 30 日
I'm looking for the same thing, something like a simple spring mass damper. I've looked through the example s-functions in simulink and i can't seem to find anything comparable. Googling turns up tutorials on making level-2 s-functions, but only in the simplest sense. Can't seem to find anything that gives a good example of using continuous states and implementing their derivatives.

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

回答 (1 件)

Abhishek GS
Abhishek GS 2015 年 4 月 10 日
Hi Danylo and KSevcik,
Please go through this link to understand the concepts of how S-Function works in Simulink environment. Look at this link to understand the functionalities of different APIs used in MATLAB level 2 S-Functions.
To get examples on S-Functions, type 'sfundemos' on your MATLAB Command prompt to look at a few demo examples that are shipped. These will help you get started in the right direction.
Hope it helps, Abhishek

Community Treasure Hunt

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

Start Hunting!

Translated by