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 --- 2294/CH3/EX3.25/EX3_25.sce | 125 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100755 2294/CH3/EX3.25/EX3_25.sce (limited to '2294/CH3/EX3.25/EX3_25.sce') 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 +//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 +//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 +//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 +//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 + -- cgit