general
Phi Kappa Chi ΦΚΧ <a:yeah:589703000977571860><a:ppHop:536353159615086612>
Jump to date
Tuesday, February 25, 2020
I feel like bio has a fucked up sense of what is fun
be a normal person like me and find fun in math
(I did enjoy leg posting his signal processing thing in the middle of bio demanding we forcfully transition 2 year olds)
gent will get an arranged marriage to some other chink
reggie found one
anyone can
the only woman you need, and hear me out
is mathematics
she is a beauty
Kappa
lmao no legs
>Wanting a gf
I will continue being single so I can not be unfaithful when I beep boop with you xbrox
Kappa
did you know men store their straight in the legs?
oof rusp
"""
(a) Simulate the signal x(t) = u(t) - u(t - 2) in Matlab.
(b)Compute and plot the magnitude and phase spectra of this signal in Matlab.
(c) Calculate the low-pass filtered version of this signal xlpf(t) = x(t)h(t) with cut-off frequency at c = pi/3 using an ideal low-pass Filter (LPF) h(t).
(d) Plot the magnitude and phase spectra of y(t) you calculated in (c) above.
"""
#Discretize time t
t0=4000.
dt=0.1
t=np.arange(-t0,t0,dt)
x = np.zeros(t.shape)
x[t>=0] = 1
x[t>=2] = 0
# to replicate continuous time matlab functionality a method taken from
# https://stackoverflow.com/a/24077914
# is implemented
w = np.fft.fftfreq(x.size)*2*np.pi/dt
r = dt*np.exp(-1j*w*t0)/(np.sqrt(2*np.pi))
X = np.fft.fft(x)*r
#xlpf filter
h = np.sin(np.pi/3*t)/(np.pi*t)
h[t==0] = 1
y = np.convolve(x,h,'same')
Y = np.fft.fft(y)*r
wr = np.abs(w) <= np.pi
fig2 = plt.figure()
ax1 = fig2.add_subplot(221)
ax2 = fig2.add_subplot(222)
ax3 = fig2.add_subplot(223)
ax4 = fig2.add_subplot(224)
ax1.plot(t[np.abs(t)<4],x[np.abs(t)<4])
ax1.set_title("x(t)")
ax2.plot(w[wr],X[wr].real)
ax2.plot(w[wr],X[wr].imag)
ax2.set_title("X(jω)")
ax3.plot(t[np.abs(t)<4],y[np.abs(t)<4])
ax3.set_title("y(t)")
ax4.plot(w[wr],Y[wr].real)
ax4.plot(w[wr],Y[wr].imag)
ax4.set_title("Y(jω)")
fig2.suptitle("LPF Demonstration")
plt.show() here you go pikahot
I know what all that code does
so it is better then my stars groups code
