freq/ma_bode.py
author Puneeth Chaganti <punchagan@fossee.in>
Fri, 27 May 2011 14:24:59 +0530
changeset 0 0efde00f9229
permissions -rw-r--r--
Initial commit.

#!/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)