- 1、本文档共8页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
SIMULINK s-function的设计(Design of SIMULINK s-function)
SIMULINK s-function的设计(Design of SIMULINK s-function)
Design of SIMULINK s-function
Simulink provides users with a number of built-in basic library modules that make up the systems model through these modules. The combination and encapsulation of the modules that are often used can build new modules that can be reused, but it is still based on the built-in modules that Simulink originally provided.
Simulink s-function is a powerful new tool to extend the module library. The concept of s-function
S - the function is a dynamic system of computer language, in MATLAB, the user can choose written in m file, can also be written in c or tex-mex files, only here to introduce how to use m documentation s - function.
S-function provides a powerful tool for extending the Simulink module library, which USES a specific invocation syntax to enable functions to interact with the Simulink solver.
The most widely used function of s-function is to customize the users own Simulink module. It is very versatile and can support continuous systems, discrete systems, and hybrid systems.
Second, create m file s-function
1. Use template file: sfuntmp1.m
This template file is located under the toolbox/simulink/blocks directory under the MATLAB root directory.
The s-function structure in the template file is very simple, and it only specifies the m file subfunction that is to be invoked for the value of the different flag. For example, when flag = 3, when the module is in the simulation phase of the calculation output, the corresponding function of the corresponding call is sys = mdloutputs (t, x, u).
The template file USES the switch statement to complete this designation, but this structure is not unique, and users can use the if statement to perform the same function. And in practice, some values can be removed according to actual needs, because not every module needs to pass all of the child function calls.
Template file just Simulink for the convenience of users and provide a reference
您可能关注的文档
- 99首小情诗(99 little love poems).doc
- 9ZS一20型稻麦秸秆铡撕机的设计(Design of 9ZS type 20 rice straw cutter).doc
- 9大屏材质对比(9 screen material comparison).doc
- 97键盘出招(97 keyboard tricks).doc
- a , b ,z ,0 ,9 ,% ,^(a、b z - 0 - 9,% ^).doc
- 9环境监测与评价(Environmental monitoring and evaluation).doc
- 98-自愿性产品认证 业务范围(98 - voluntary product certification business scope).doc
- A0417、催化燃烧催化剂制备(A0417, catalytic combustion catalyst preparation).doc
- 700多条建筑设计知识(More than 700 architectural design knowledge).doc
- ABAP QUERY的概念以及基本用途(The concept of ABAP QUERY and its basic purpose).doc
文档评论(0)