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 --- 692/CH2/EX2.20/P2_20.sce | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 692/CH2/EX2.20/P2_20.sce (limited to '692/CH2/EX2.20/P2_20.sce') diff --git a/692/CH2/EX2.20/P2_20.sce b/692/CH2/EX2.20/P2_20.sce new file mode 100755 index 000000000..0a63db736 --- /dev/null +++ b/692/CH2/EX2.20/P2_20.sce @@ -0,0 +1,20 @@ +//EXAMPLE 2.20,Passive or lossless system. +clear; +clc; +a=input("any value of a less than or equal to one") +n=-10:1:10; + x=n; + y=a*n; + S=0; + for i=1:length(n) + S=S+y^2; + end + + if a<1 then + disp('the system is passive') + else + + a==1 + disp('the system is lossless') + + end -- cgit