
iv Contents
-
Writing S-Functions
1
-
How to Contact The MathWorks:
2
-
Contents
3
-
Overview of
7
-
S-Functions
7
-
1 Overview of S-Functions
10
-
Introduction
11
-
Direct Feedthrough
15
-
Dynamically Sized Inputs
15
-
that delays each
17
-
Sample S-Functions
19
-
As M-Files
25
-
of theblock
29
-
M-file S-function:
33
-
% End of mdlInitializeSizes
40
-
Passing Additional Parameters
44
-
As C-MEX files
45
-
Exception Free Code
57
-
Update Diagram under your
62
-
Edit menu
62
-
Data View of S-Functions
63
-
*y++ = *u++; /* Incorrect */
65
-
Parameter Changes
67
-
The synopsis is
74
-
Masked Multiport S-Functions
76
-
Block-based Sample Times
80
-
Port-based Sample Times
83
-
Multirate S-Function Blocks
86
-
Configuring Work Vectors
87
-
Memory Allocation
91
-
S-Function Initialization
92
-
S, 0, 0.0);
103
-
S, 1, 0.0);
111
-
S, 0, 0);
121
-
Function
128
-
Function-Call Subsystems
139
-
* call on 3rd element */
140
-
* call on 1st element */
140
-
(S,inputPortIdx,offset)
147
-
(S,outputPortIdx,offset)
149
-
(S,inputPortIdx)
151
-
(S,outputPortIdx)
153
-
time of an output port. This
153
-
(S,st_index,value)
154
-
Guidelines for Writing
167
-
C MEX S-Functions
167
-
Types of S-Functions
169
-
Noninlined S-Functions
170
-
Wrapper S-Functions
170
-
Fully Inlined S-Functions
171
-
Writing Wrapper S-Functions
174
-
The TLC S-Function Wrapper
179
-
How to Inline
180
-
The Inlined Code
183
-
Error Handling
189
-
User Data Caching
189
-
Example Model
190
-
This is the code that is
192
-
S-function block i n the
192
Kommentare zu diesen Handbüchern