summaryrefslogtreecommitdiffstats
path: root/scilab/modules/cacsd/tests/nonreg_tests/bug_4596.dia.ref
blob: 191a1b9878875a065e0070b2c52d3d72e098ae33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//<-- CLI SHELL MODE -->
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2009 - INRIA - Serge Steer
//
//  This file is distributed under the same license as the Scilab package.
// =============================================================================
// <-- Non-regression test for bug 4596 -->
//
// <-- Bugzilla URL -->
// http://bugzilla.scilab.org/show_bug.cgi?id=4596
//
// <-- Short Description -->
//   g_margin fails to return the gain margins in some cases.
s=%s;
K=485000.;
h=syslin('c', K / ( s * (s+100)^2 ) );
[gm,fr]=g_margin(h)
 fr  = 
    15.915494
 gm  = 
    12.305765
if gm==[] then bugmes();quit;end
if abs(2*%pi*fr-100)>100*%eps then bugmes();quit;end