We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
GlobalScope
@independent_variables
1 parent 18cc951 commit 6482983Copy full SHA for 6482983
src/independent_variables.jl
@@ -7,8 +7,12 @@ Define one or more independent variables. For example:
7
@variables x(t)
8
"""
9
macro independent_variables(ts...)
10
- :(@parameters $(ts...)) |> esc # TODO: treat independent variables separately from variables and parameters
+ Symbolics._parse_vars(:independent_variables,
11
+ Real,
12
+ ts,
13
+ toiv) |> esc
14
end
15
-toiv(s::Symbolic) = setmetadata(s, MTKVariableTypeCtx, PARAMETER)
16
+toiv(s::Symbolic) = GlobalScope(setmetadata(s, MTKVariableTypeCtx, PARAMETER))
17
+toiv(s::Symbolics.Arr) = wrap(toiv(value(s)))
18
toiv(s::Num) = Num(toiv(value(s)))
0 commit comments