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/CH7/EX7.9/Example_7_9.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/CH7/EX7.9/Example_7_9.sce')
-rwxr-xr-x | 1592/CH7/EX7.9/Example_7_9.sce | 31 |
1 files changed, 31 insertions, 0 deletions
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');
|