Question: Please help! 2. Write a Python function to calculate the correlation coefficient of two signals. Use that function to calculate the correlation coefficient of every

Please help!
2. Write a Python function to calculate the correlation coefficient of two signals. Use that function to calculate the correlation coefficient of every pair of signals below, and compare to your analytical solution. (Hint: the function will have three inputs: sample points of the 1st signal, sample points of the 2nd signal and the time step) a. X1(t)=u(t+0.5)-u(t)-u(t)+u(t-0.5) b. X2(t)=(t+0.5)*[u(t+0.5)-u(t)] + (0.5-t)* [u(t)-u(t-0.5)] c. X3(t)=sin(2*pi*t)*[ u(t+0.5)-u(t-0.5)] d. X4(t)=cos(4*pi*t)*[ u(t+0.5)-u(t-0.5)] 2. Write a Python function to calculate the correlation coefficient of two signals. Use that function to calculate the correlation coefficient of every pair of signals below, and compare to your analytical solution. (Hint: the function will have three inputs: sample points of the 1st signal, sample points of the 2nd signal and the time step) a. X1(t)=u(t+0.5)-u(t)-u(t)+u(t-0.5) b. X2(t)=(t+0.5)*[u(t+0.5)-u(t)] + (0.5-t)* [u(t)-u(t-0.5)] c. X3(t)=sin(2*pi*t)*[ u(t+0.5)-u(t-0.5)] d. X4(t)=cos(4*pi*t)*[ u(t+0.5)-u(t-0.5)]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
