summaryrefslogtreecommitdiff
path: root/692/CH2/EX2.20/P2_20.sce
blob: 0a63db7367622e9b0f22723bfc6ba9a3508e8634 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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