freq/ma_bode.py
changeset 0 0efde00f9229
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/freq/ma_bode.py	Fri May 27 14:24:59 2011 +0530
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+# 5.3
+
+import scipy as sp
+from pylab import *
+
+w = arange(0, pi, 0.01)
+subplot(2,1,1)
+loglog(w,abs(1+2*cos(w))/3)
+ylabel('Magnitude')
+
+subplot(2,1,2)
+semilogx(w,angle(1+2*cos(w))*180/pi)
+xlabel('w (rad/s)')
+ylabel('Phase')
+
+show()
+#axis tight, label('',18,'w (rad/s)','Phase',18)