From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1592/CH7/EX7.6/Example_7_6.sce | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 1592/CH7/EX7.6/Example_7_6.sce (limited to '1592/CH7/EX7.6') diff --git a/1592/CH7/EX7.6/Example_7_6.sce b/1592/CH7/EX7.6/Example_7_6.sce new file mode 100755 index 000000000..754c5deff --- /dev/null +++ b/1592/CH7/EX7.6/Example_7_6.sce @@ -0,0 +1,20 @@ +//Scilab Code for Example 7.6 of Signals and systems by +//P.Ramakrishna Rao +clc; +clear x y1 y y2 q t n; +clear; +//y(n)=x(n)-x(n-1); +x=[2,4,3,6,7] +for n=2:5 + y(1,n)=x(n)-x(n-1); +end +disp(y,'This input gives the output:'); +disp('For a shift (n0) of 2 seconds'); +disp('At n=3 seconds:'); +n=5; +b=y(n-2); +a=x(n-2)-x(n-2-1); +disp(a,'x(n-2):'); +disp(b,'is equal to y(n-2):'); +disp('Hence the system is Shift invariant/fixed'); + -- cgit