File: zgrid.sci

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (32 lines) | stat: -rw-r--r-- 966 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function []=zgrid()
//
// Copyright INRIA
xselect();
square(-1.1,-1.1,1.1,1.1);
xtitle( ['loci with constant damping and constant frequencies';...
      'in discrete plane'],' ',' ');
//
xsi=0:0.1:1 //
//                           2                 2
//roots of                  s  + 2*xsi*w0*s +w0
//given by : w0*(-xsi+-%i*sqrt(1-sxi*xsi))
raci=((0:0.05:1)*%pi)'*(-xsi+%i*sqrt(ones(xsi)-xsi.*xsi))
// continuous --> discrete 
raci=exp(raci);[mr,nr]=size(raci);
for l=1:nr,
    xstring(real(raci(mr-10,l)),-imag(raci(mr-10,l)),' '+string(xsi(l)),0,0);
end;
  plot2d(real(raci),imag(raci),1*ones(1,nr),"001");
  plot2d(real(raci),-imag(raci),1*ones(1,nr),"001");
//
w0=(0:0.1:1)*%pi; //
e_itheta=exp(%i*(%pi/2:0.05:%pi)')
zw=exp(e_itheta*w0);[mz,nz]=size(zw)
for l=1:nz,
    xstring(real(zw(1,l)),imag(zw(1,l)),' '+string(w0(l)/(2*%pi)),0,0);
end;
//-- the curves 
   plot2d(real(zw),imag(zw),1*ones(1,nr),"001");
   plot2d(real(zw),-imag(zw),1*ones(1,nr),"001");