-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDAMP.jl
33 lines (33 loc) · 1.56 KB
/
DAMP.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function DAMP(ALPHA)
A=[-0.2670 0.8820 -0.1080 -8.8000 -0.1260 -0.3600 -7.2100 -0.3800 0.0610
-0.1100 0.8520 -0.1080 -25.8000 -0.0260 -0.3590 -0.5400 -0.3630 0.0520
0.3080 0.8760 -0.1880 -28.9000 0.0630 -0.4430 -5.2300 -0.3780 0.0520
1.3400 0.9580 0.1100 -31.4000 0.1130 -0.4200 -5.2600 -0.3860 -0.0120
2.0800 0.9620 0.2580 -31.2000 0.2080 -0.3830 -6.1100 -0.3700 -0.0130
2.9100 0.9740 0.2260 -30.7000 0.2300 -0.3750 -6.6400 -0.4530 -0.0240
2.7600 0.8190 0.3440 -27.7000 0.3190 -0.3290 -5.6900 -0.5500 0.0500
2.0500 0.4830 0.3620 -28.2000 0.4370 -0.2940 -6.0000 -0.5820 0.1500
1.5000 0.5900 0.6110 -29.0000 0.6800 -0.2300 -6.2000 -0.5950 0.1300
1.4900 1.2100 0.5290 -29.8000 0.1000 -0.2100 -6.4000 -0.6370 0.1580
1.8300 -0.4930 0.2980 -38.3000 0.4470 -0.1200 -6.6000 -1.0200 0.2400
1.2100 -1.0400 -2.2700 -35.3000 -0.3300 -0.1000 -6.0000 -0.8400 0.1500]
#
S= 0.2 * ALPHA
K= floor(S)+3
if(K <= 1)
K= 2
end
if(K >= 12)
K= 11
end
DA= S - K +3
L = K + fix( 1.1*sign(DA) )
#
D=zeros(9,1)
K=convert(Int64, K)
L=convert(Int64, L)
for I= 1:9
D[I]= A[K,I] + abs(DA) * (A[L,I] - A[K,I])
end
return D
end