summaryrefslogtreecommitdiff
path: root/62/CH6/EX6.35/ex_6_35.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /62/CH6/EX6.35/ex_6_35.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '62/CH6/EX6.35/ex_6_35.sce')
-rwxr-xr-x62/CH6/EX6.35/ex_6_35.sce22
1 files changed, 22 insertions, 0 deletions
diff --git a/62/CH6/EX6.35/ex_6_35.sce b/62/CH6/EX6.35/ex_6_35.sce
new file mode 100755
index 000000000..3961a8106
--- /dev/null
+++ b/62/CH6/EX6.35/ex_6_35.sce
@@ -0,0 +1,22 @@
+clear;
+clc;
+close;
+disp("given system is y[n]-a*y[n-1]=x[n]");
+disp("taking fourier transform H(w)=Y(w)/X(w)=1/(1-a*e^-j*w)");
+//impulse response
+n=-10:10;
+w=-3:0.01:3;
+a=.5;
+Hw=ones(1,length(w))./(1-a*%e^(-%i*w));
+h=(1/2*%pi)*Hw*exp(%i*w'*n);
+disp("impulse response is a^n*u[n]")
+plot2d3(n,h);
+plot(n,h,'r.')
+xtitle('h[n]','n')
+figure
+plot(w,abs(Hw),'r')
+a=0.9;
+Hw=ones(1,length(w))./(1-a*%e^(-%i*w));
+plot(w,abs(Hw),'b')
+xtitle('|H(w)|','w')
+legend(['a=0.5';'a=0.9']); \ No newline at end of file