-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·34 lines (24 loc) · 962 Bytes
/
test.sh
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
34
# Cambiar cuando sea por columna
N=2
A="1,2,1,2"
B="2,1,2,1"
T="0,0,1,1"
M="1.570796327,0,1.047197551,4.71238898"
echo "1" "1" "2" "2" "2" "2" "1" "1" "0" "0" "1" "1" "1.570796327" "0" "1.047197551" "4.71238898"| ./reentrega $N 1
# echo $A | ./ejer2 $N
# echo $RESULTADO
# CALCULOS
# Calculo de R
# (1 - 0) * (1 - cos(1,570796327)) + 0 * sin(1,570796327) = 1
# (1 - 0) * (1 - cos(0)) + 0 * sin(0) = 0
# (1 - 1) * (1 - cos(1,047197551)) + 1 * sin(1,047197551) = 0.86602540368
# (1 - 1) * (1 - cos(4,71238898)) + 1 * sin(4,71238898) = -1
# A + B = 3,3,3,3
# AVERAGE = 0.86602540368 / 4 = 0,216506351
# R(A + B)
# R 0,0 = 3 = 1 * 3 + 0 * 3
# R 0,1 = 3 = 1 * 3 + 0 * 3
# R 1,0 = -0.401925 = 0.86602540368 * 3 + -1 * 3
# R 1,1 = -0.401925 = 0.86602540368 * 3 + -1 * 3
# AVERAGE * R(A + B) = 0,649519053, 0,649519053, −0,087019315, −0,087019315
# 𝑇 + AVERAGE * R(A + B) = 0,649519053, 0,649519053,0,912980685,0,912980685