File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,8 @@ to better scale to larger systems. You can define derivatives for your own
249249function via the dispatch:
250250
251251``` julia
252- ModelingToolkit. Derivative (:: typeof (my_function),args,:: Val{i} )
252+ # `N` arguments are accepted by the relevant method of `my_function`
253+ ModelingToolkit. Derivative (:: typeof (my_function), args:: NTuple{N,Any} , :: Val{i} )
253254```
254255
255256where ` i ` means that it's the derivative of the ` i ` th argument. ` args ` is the
@@ -259,7 +260,7 @@ You should return an `Operation` for the derivative of your function.
259260For example, ` sin(t) ` 's derivative (by ` t ` ) is given by the following:
260261
261262``` julia
262- ModelingToolkit. Derivative (:: typeof (sin),args, :: Val{1} ) = cos (args[1 ])
263+ ModelingToolkit. Derivative (:: typeof (sin), args:: NTuple{1,Any} , :: Val{1} ) = cos (args[1 ])
263264```
264265
265266### Macro-free Usage
You can’t perform that action at this time.
0 commit comments