Skip to content

Commit 1099a20

Browse files
authored
Testmargin (#431)
* add test for margin and marginplot * add test for margin and marginplot
1 parent a592d75 commit 1099a20

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/test_analysis.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,24 @@ G = [1/(s+2) -1/(s+2); 1/(s+2) (s+1)/(s+2)]
191191
@test length(tzero(G)) == 1
192192
@test_broken size(minreal(ss(G)).A) == (2,2)
193193

194+
195+
## MARGIN ##
196+
197+
w = exp10.(LinRange(-1, 2, 100))
198+
P = tf(1,[1.0, 1])
199+
ωgₘ, gₘ, ωϕₘ, ϕₘ = margin(P, w)
200+
@test length.((ωgₘ, gₘ, ωϕₘ, ϕₘ)) == (1,1,1,1)
201+
@test gₘ[] == Inf
202+
@test ϕₘ[] == Inf
203+
204+
205+
P = tf(1,[1.0, 1, 0])
206+
ωgₘ, gₘ, ωϕₘ, ϕₘ = margin(P, w)
207+
@test length.((ωgₘ, gₘ, ωϕₘ, ϕₘ)) == (1,1,1,1)
208+
@test gₘ[] == Inf
209+
@test ϕₘ[] 50
210+
@test ωϕₘ[] 0.7871132039227572
211+
marginplot(P, w)
212+
213+
194214
end

0 commit comments

Comments
 (0)