We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c30105 commit dfc1163Copy full SHA for dfc1163
test.m
@@ -0,0 +1,8 @@
1
+% This tests whether the impulse_response.m function works
2
+
3
+fs=10;
4
+t=-1:1/fs:1;
5
+x=cos(2*pi*t); % input signal
6
+y=3*cos(2*pi*t); % output signal
7
+[h,t]=impulse_response(x,y,fs); % we expect the impulse response to be
8
+amplitude=(1/fs)*trapz(h) % a dirac delta with amplitude 3
0 commit comments