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 /2294/CH3/EX3.25/EX3_25.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 '2294/CH3/EX3.25/EX3_25.sce')
-rwxr-xr-x | 2294/CH3/EX3.25/EX3_25.sce | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/2294/CH3/EX3.25/EX3_25.sce b/2294/CH3/EX3.25/EX3_25.sce new file mode 100755 index 000000000..5e1a42125 --- /dev/null +++ b/2294/CH3/EX3.25/EX3_25.sce @@ -0,0 +1,125 @@ +//Example 3.25<i>
+//Find whether the system is causal and stable.
+clear all;
+ clc ;
+ n = -5:5;
+ for i =1: length (n)
+ if(n(i) <=0)
+ h(i)= 2^n(i);
+ else
+ h(i)=0;
+ end
+ end
+ causal =%t;
+ for i =1: length (n)
+ if n(i) <0 & h(i) ~=0 then
+ causal =%f;
+ end
+ end
+ disp (causal,'The statement that the system is causal is:');
+ n =0:100000;
+ for i =1: length (n)
+ if(n(i) <=0)
+ h(i)= 2^n(i);
+ else
+ h(i)=0;
+ end
+ end
+ bibo =sum(h);
+ if (bibo < %inf ) then
+ disp (" system is bibo stable ");
+ else
+ disp (" systes not stable ");
+end
+//Example 3.25<ii>
+//Find whether the system is causal and stable.
+clear all;
+ clc ;
+ n = -5:5;
+ for i =1: length (n)
+ if(n(i) >=1)
+ h(i)= exp(2*n(i));
+ else
+ h(i)=0;
+ end
+ end
+ causal =%t;
+ for i =1: length (n)
+ if n(i) <0 & h(i) ~=0 then
+ causal =%f;
+ end
+ end
+ disp (causal,'The statement that the system is causal is:');
+ n =0:100000;
+ for i =1: length (n)
+ if(n(i) >=1)
+ h(i)= exp(2*n(i));
+ else
+ h(i)=0;
+ end
+ end
+ bibo =sum(h);
+ if (bibo < %inf ) then
+ disp (" system is bibo stable ");
+ else
+ disp (" system not stable ");
+ end
+//Example 3.25<iii>
+//Find whether the system is causal and stable.
+clear all;
+ clc ;
+ n = -5:5;
+ for i =1: length (n)
+ if(n(i) <=3)
+ h(i)= (5*n(i));
+ else
+ h(i)=0;
+ end
+ end
+ causal =%t;
+ for i =1: length (n)
+ if n(i) <0 & h(i) ~=0 then
+ causal =%f;
+ end
+ end
+ disp (causal,'The statement that the system is causal is:');
+ n =0:100000;
+ for i =1: length (n)
+ if(n(i) <=1)
+ h(i)= (5*n(i));
+ else
+ h(i)=0;
+ end
+ end
+ bibo =sum(h);
+ if (bibo < %inf ) then
+ disp (" system is bibo stable ");
+ else
+ disp (" system not stable ");
+ end
+//Example 3.2<iv>
+//Find whether the system is causal and stable.
+clear all;
+ clc ;
+ n = -5:5;
+ for i =1: length (n)
+ h(i)= exp(-6*abs(n(i)));
+ end
+ causal =%t;
+ for i =1: length (n)
+ if n(i) <0 & h(i) ~=0 then
+ causal =%f;
+ end
+ end
+ disp (causal,'The statement that the system is causal is:');
+ n =0:100000;
+ for i =1: length (n)
+ h(i)= exp(-6*abs(n(i)));
+ end
+ bibo =sum(h);
+ if (bibo < %inf ) then
+ disp (" system is bibo stable ");
+ else
+ disp (" system not stable ");
+ end
+
|