File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed
Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -12,22 +12,6 @@ function show_fields(object)
1212 end
1313end
1414
15- " Get the Jacobian of a set of equations `eqs` with respect to the variables `vars`. "
16- function get_Jacobian(eqs:: Vector{Num} , vars:: Vector{Num} ):: Matrix{Num}
17- length(eqs) == length(vars) || error(" Jacobians are only defined for square systems!" )
18- M = Matrix{Num}(undef, length(vars), length(vars))
19-
20- for idx in CartesianIndices(M)
21- M[idx] = expand_derivatives(d(eqs[idx[1 ]], vars[idx[2 ]]))
22- end
23- return M
24- end # should replace with Symbolics.jacobian
25-
26- function get_Jacobian(eqs:: Vector{Equation} , vars:: Vector{Num} ):: Matrix{Num}
27- expr = Num[getfield(eq, :lhs) - getfield(eq, :rhs) for eq in eqs]
28- return get_Jacobian(expr, vars)
29- end
30-
3115macro eqtest(expr)
3216 @assert expr. head == :call && expr. args[1 ] in [:(== ), :(!= )]
3317 return esc(
You can’t perform that action at this time.
0 commit comments