Skip to content

Commit 06b54f4

Browse files
committed
add to ccode docstring
1 parent a8ff834 commit 06b54f4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/SymbolicControlSystems.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,12 @@ end
270270
271271
Return a string with C-code for filtering a signal `u` through `G`.
272272
273+
If `G` is a transfer function, the system must be SISO, for MIMO systems, use a `StateSpace` model instead.
274+
275+
With a transfer function as input, the code will return a double corresponding to the single output. With a StateSpace model as input, the code will produce a function that takes a double pointer `double *y` as the first input argument. Make sure that `y` points to an array of length `G.ny` before calling the function.
276+
277+
The state is internally handled by C `static` variables, so the generated code is thus stateful.
278+
273279
# Arguments:
274280
- `G`: A linear system
275281
- `simplify`: A function for symbolic simplification. You may try `Sympy.simplify`, but for large systems, this will take a long time to compute.

0 commit comments

Comments
 (0)