changeset 0 | 0efde00f9229 |
-1:000000000000 | 0:0efde00f9229 |
---|---|
1 #!/usr/bin/python |
|
2 # 5.4 |
|
3 |
|
4 import scipy as sp |
|
5 from pylab import * |
|
6 |
|
7 w = arange(0, pi, 0.01) |
|
8 G = 1-exp(-1j*w) |
|
9 subplot(2,1,1) |
|
10 loglog(w,abs(G)) |
|
11 ylabel('Magnitude') |
|
12 |
|
13 subplot(2,1,2) |
|
14 semilogx(w, 180*angle(G)/pi) |
|
15 xlabel('w (rad/s)') |
|
16 ylabel('Phase') |
|
17 |
|
18 show() |
|
19 #axis tight, label('',18,'w (rad/s)','Phase',18) |