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
249
249
function via the dispatch:
250
250
251
251
``` 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} )
253
254
```
254
255
255
256
where ` 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.
259
260
For example, ` sin(t) ` 's derivative (by ` t ` ) is given by the following:
260
261
261
262
``` 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 ])
263
264
```
264
265
265
266
### Macro-free Usage
You can’t perform that action at this time.
0 commit comments