diff options
Diffstat (limited to '716/CH9/EX9.6/Solved_Ex9_6.sce')
-rwxr-xr-x | 716/CH9/EX9.6/Solved_Ex9_6.sce | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/716/CH9/EX9.6/Solved_Ex9_6.sce b/716/CH9/EX9.6/Solved_Ex9_6.sce new file mode 100755 index 000000000..bbf6ef324 --- /dev/null +++ b/716/CH9/EX9.6/Solved_Ex9_6.sce @@ -0,0 +1,25 @@ +//Determine the Response of LTI system if input x(n)={1 1 1} and impulse Response h(n)={-1 -1}
+clc;
+clear;
+x=[1 1 1];
+disp(x,'Input signal=> x(n)=');
+h=[-1 -1];
+disp(h,'Impulse Response=> h(n)=');
+k=length(x)+length(h)-1;
+for n=length(x)+1:1:k
+ x(n)=0;//appending 0s
+end
+for n=length(h)+1:1:k
+ h(n)=0;//appending 0s
+end
+n=0:1:k;
+
+X=fft(x);
+disp(X,'4 point FFT of x(n)=>');
+
+H=fft(h);
+disp(X,'4 point FFT of h(n)=>');
+
+Y=X.*H;
+y=ifft(Y);
+disp(y,'Response to input,x(n)=> y(n)=');
\ No newline at end of file |