Created
October 29, 2019 14:28
-
-
Save anasAlsalol/6bc7889ca9b03942092fbed56a7055f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| AbnormalECG = open('AbnormalECG.txt').read().split() | |
| ReferenceECG = open('ReferenceECG.txt').read().split() | |
| sum = 0 | |
| for i in range(len(AbnormalECG)): | |
| sum = sum + float(AbnormalECG[i]) * float(ReferenceECG[i]) | |
| ex = 0 | |
| for i in range(len(AbnormalECG)): | |
| ex = ex + float(AbnormalECG[i]) * float(AbnormalECG[i]) | |
| ey = 0 | |
| for i in range(len(ReferenceECG)): | |
| ey = ey + float(ReferenceECG[i]) * float(ReferenceECG[i]) | |
| final = 1 / (math.sqrt(ey) * math.sqrt(ex) ) * sum | |
| print(final) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment