1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // This file must be used under the terms of the CeCILL.
4 // This source file is licensed as described in the file COPYING, which
5 // you should have received as part of this distribution. The terms
6 // are also available at
7 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
16 error(msprintf(gettext("%s: Wrong number of input arguments: %d expected.\n"),"plzr",1)),
21 error(msprintf(gettext("%s: Wrong value of input argument %d: Proper system expected.\n"),"plzr",1));
23 case 'state-space' then
25 error(msprintf(gettext("%s: Wrong number of input arguments: %d expected.\n"),"plzr",1)),
29 error(msprintf(gettext("%s: Wrong value of input argument %d: Proper system expected.\n"),"plzr",1));
33 error(msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"),"plzr",4)),
36 error(msprintf(gettext("%s: Wrong type for input argument #%d: Array of floating point numbers expected.\n"),..
42 error(msprintf(gettext("%s: Wrong type for input argument #%d: Linear dynamical system expected.\n"),"plzr",1))
44 error(msprintf(gettext("%s: Wrong type of input argument #%d: Array of floating point numbers expected.\n"),"plzr",1))
48 error(msprintf(gettext("%s: Wrong type for input argument #%d: Array of floating point numbers expected.\n"),..
54 [al,be]=tr_zer(a,b,c,d)
56 ni=imag(nr);nr=real(nr)
57 di=imag(dr);dr=real(dr)
59 mxx=max([nr;dr;1]*1.1)
60 mnx=min([nr;dr;-1]*1.1)
61 my=max(abs([ni;di;1])*1.1)
63 rect=[mnx, -my, mxx, my];
65 wdim=get(gcf(),'axes_size')
66 dx=(mxx-mnx)/wdim(1);dy=2*my/wdim(2)
68 ax=(dy*wdim(1)-mxx+mnx)/2
71 ay=(dx*wdim(2)-2*my)/2
74 rect=[mnx, -my, mxx, my];
77 ax.data_bounds=[mnx, -my; mxx, my];
81 if size(nr,'*')<>0 then
83 e=gce();e.line_mode='off';e.mark_mode='on';
84 e.mark_size_unit="point";e.mark_size=7;e.mark_style=5;
85 legs=[legs;gettext("Zeros")]
88 if size(dr,'*')<>0 then
90 e=gce();e.line_mode='off';e.mark_mode='on';
91 e.mark_size_unit="point";e.mark_size=7;e.mark_style=2;
92 legs=[legs;gettext("Poles")]
95 ax.grid=ones(1,3)*color('gray')
97 xarc(-1,1,2,2,0,360*64)
98 xtitle(gettext("Transmission zeros and poles"),gettext("Real axis"), ...
99 gettext("Imaginary axis"));
100 if legs<>[] then legend(lhandle,legs,1),end