diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1592/CH10/EX10.11/example_10_11.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1592/CH10/EX10.11/example_10_11.sce')
-rwxr-xr-x | 1592/CH10/EX10.11/example_10_11.sce | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/1592/CH10/EX10.11/example_10_11.sce b/1592/CH10/EX10.11/example_10_11.sce new file mode 100755 index 000000000..e2f72428c --- /dev/null +++ b/1592/CH10/EX10.11/example_10_11.sce @@ -0,0 +1,23 @@ +//Scilab Code for Example 10.11 of Signals and systems by
+//P.Ramakrishna Rao
+//System Identification
+//Cross Correlation
+clear;
+clc;
+clear x n a y h z;
+x=[1,1,1,1,0,0];
+y=[1,3,6,10,12,12,10,6,3,1];
+h(1)=y(1)/x(1);
+for n=2:7
+ for k=1:n-1
+ z(k)=(h(k)*x(n-k));
+ h(n)=(y(n)-sum(z));
+ end
+end
+disp(h,'h(n)');
+n=1:7;
+a=gca();
+a.x_location="origin";
+a.y_location="origin";
+plot2d3(n,h,-4);
+title('System Response h(n)');
|