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.9/Example_7_9.sce | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 1592/CH7/EX7.9/Example_7_9.sce (limited to '1592/CH7/EX7.9/Example_7_9.sce') diff --git a/1592/CH7/EX7.9/Example_7_9.sce b/1592/CH7/EX7.9/Example_7_9.sce new file mode 100755 index 000000000..c804243cb --- /dev/null +++ b/1592/CH7/EX7.9/Example_7_9.sce @@ -0,0 +1,31 @@ +//Scilab Code for Example 7.9 of Signals and systems by +//P.Ramakrishna Rao +clc; +clear x y1 y y2 q t n; +clear; +//y(t)=exp|x(n)| +x1=[1,3,5,3];//random variable +x2=[2,4,6,4]; +for n=1:4 + y1(1,n)=exp(abs(x1(n))); + y2(1,n)=exp(abs(x2(n))); +end +b1=2; +b2=3; +x=b1*x1+b2*x2; +disp(x,'The input to the system is:'); +for n=1:4 + q(1,n)=exp(abs(b1*(x1(n))+b2*(x2(n)))); +end +disp(q,'This input gives the output:'); +y=b1*y1+b2*y2; +disp(y,'For the system to be linear the output should be:'); +disp('(ii) Hence the system is not linear'); +disp('For a delay (n0) of 2 seconds'); +disp('At n=3 seconds:'); +n=4; +a=exp(abs(x1(n-2))); +b=y1(1,n-2); +disp(a,'e^x(n-n0):'); +disp(b,'is equal to y(n-n0):'); +disp('(iii) Hence the system is Time invariant'); -- cgit