Skip to content

Commit dfc1163

Browse files
author
Jason Bluhm
committedJul 22, 2013
Added Matlab test script
1 parent 6c30105 commit dfc1163

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎test.m

+8
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)
Please sign in to comment.