29 lines
448 B
Plaintext
29 lines
448 B
Plaintext
|
#!/usr/bin/env python3
|
||
|
# -*- coding: utf-8 -*-
|
||
|
"""
|
||
|
Created on Thu Feb 28 11:00:18 2019
|
||
|
|
||
|
@author: oyvind
|
||
|
"""
|
||
|
|
||
|
import numpy as np
|
||
|
import matplotlib.pyplot as plt
|
||
|
|
||
|
def H(f):
|
||
|
w = 2 * np.pi * f
|
||
|
|
||
|
return (w * 10**(-4))/np.sqrt(1+(w*10**(-4))**2)
|
||
|
|
||
|
frq = []
|
||
|
values = []
|
||
|
for i in range(2*10**5):
|
||
|
frq.append(i)
|
||
|
value = 20 * np.log10(abs(H(i)))
|
||
|
values.append(value)
|
||
|
|
||
|
plt.plot(frq, values)
|
||
|
plt.xscale('log')
|
||
|
plt.gca().xaxis.grid(True)
|
||
|
|
||
|
|