summaryrefslogtreecommitdiff
path: root/569/CH4/EX4.16/4_16.sci
blob: 62bdf5e89ad49c4af00dd80bbb7326eb4b688049 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Calculate time lag and ratio of output and input
clc;
disp('when time period is 600s')
w=2*%pi/600;
tc=60;
T_lag=(1/w)*atan(w*tc);
disp(T_lag,'time lag (s)=')
M=1/((1+(w*tc)^2)^0.5);
disp(M,'ratio of output and input=')
disp('when time period is 120s')
w=2*%pi/120;
tc=60;
T_lag=(1/w)*atan(w*tc);
disp(T_lag,'time lag (s)=')
M=1/((1+(w*tc)^2)^0.5);
disp(M,'ratio of output and input=')