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
11 function [] = sgrid(zeta,wn,col)
18 immediate_drawing=fig.immediate_drawing;
19 fig.immediate_drawing="off";
25 zeta = linspace(0,1,10);
28 if type(zeta)<>10 then
29 error(msprintf(_("%s: Wrong type for input argument #%d: String array expected.\n"),"sgrid",1))
31 if size(zeta,'*')<>1 then
32 error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"sgrid",1))
35 zeta = [ 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1 ];
38 axes.data_bounds=[-20,-20;20,20];axes.axes_visible='on';
42 wmax = 10 .^(floor(log10(max(abs(axes.data_bounds)))));
45 [rx,cx]=size(wn);[ry,cy]=size(zx);
46 w=wn.*.ones(cy,1);z=zx'.*.ones(1,cx);
51 im = w .* sqrt( 1 - z .* z );
52 plot2d(re,im,style=col*ones(1,zc));
53 plot2d(re,-im,style=col*ones(1,zc));
59 axes.clip_state = "clipgrf";
60 xnumb(re(1,:),im(1,:),wn);
61 axes.clip_state = "off";
63 // building an other grid
66 [rx,cx]=size(wn);[ry,cy]=size(zeta);
67 w=wn.*.ones(cy,1);z=zeta'.*.ones(1,cx);
73 im = w .* sqrt( 1 - z .* z );
74 plot2d(re',im',style=col*ones(1,zr));
75 plot2d(re',-im',style=col*ones(1,zr));
77 // info on each curve ( straight lines )
79 axes.clip_state = "clipgrf";
80 xnumb(re(:,$)',im(:,$)',zeta);
81 axes.clip_state = "off";
82 fig.immediate_drawing=immediate_drawing;