diff options
Diffstat (limited to '692/CH2/EX2.20/P2_20.sce')
-rwxr-xr-x | 692/CH2/EX2.20/P2_20.sce | 20 |
1 files changed, 20 insertions, 0 deletions
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 |