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.
LinearizationProblem
1 parent 55ee72a commit c3a6529Copy full SHA for c3a6529
test/downstream/linearize.jl
@@ -1,4 +1,5 @@
1
using ModelingToolkit, Test
2
+using CommonSolve: solve
3
4
# r is an input, and y is an output.
5
@independent_variables t
@@ -14,11 +15,13 @@ eqs = [u ~ kp * (r - y)
14
15
@named sys = ODESystem(eqs, t)
16
17
lsys, ssys = linearize(sys, [r], [y])
18
+lprob = LinearizationProblem(sys, [r], [y])
19
+lsys2 = solve(lprob)
20
-@test lsys.A[] == -2
-@test lsys.B[] == 1
-@test lsys.C[] == 1
21
-@test lsys.D[] == 0
+@test lsys.A[] == lsys2.A[] == -2
22
+@test lsys.B[] == lsys2.B[] == 1
23
+@test lsys.C[] == lsys2.C[] == 1
24
+@test lsys.D[] == lsys2.D[] == 0
25
26
lsys, ssys = linearize(sys, [r], [r])
27
0 commit comments