From 7773288b492717290188ce27fd2ef15944f6ff18 Mon Sep 17 00:00:00 2001 From: "quentin.perret" Date: Thu, 2 Jun 2022 18:10:42 +0200 Subject: [PATCH] same as precedent --- Code-C/power | Bin 17600 -> 17600 bytes Code-C/power.c | 2 +- Py-Script/puissance.py | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Code-C/power b/Code-C/power index 974d24690ed2ce0f34094d141ebf41981bccbe2f..86f2cfba8e212e3175d21435468452408f3edacd 100755 GIT binary patch delta 331 zcmX@m$#|fXaRUb<=Uh$(Fqpepknu31$mbK@`y`jUOwVMIZ?#F;bnW(<%@vzpFlq5| zR&g*ec=YlLb8MCtJj7n#ExJ;jfuWmsK9Kb2cKy+L&ZG1A3ywek|9kX?ZUBjRbY24q z9sdgwa^0{GsGk8OF!AUA|2sf-o;;kU$1mRkww_B I(s4O602f_&lK=n! delta 301 zcmX@m$#|fXaRUb*?G+|)U)%eV~AttpHPop-3>tDU?0uD9?fq!UL4*W zCAo}kvH*v|B!w?r9Y6m6H(+95c=2QNKZRwCvJoJ|9Qg#=n4Edpn1XrOfmXTzg<2RH z7y>3ARB~s{`1b!l<7PqS<6M&im{=y?(Dh&}*{rC?&jO?jjs7z+7ECrY-4En^H1%g> k6qxL2zMe5+^GEad9E^pNA3ErBmPmpf%uupf(s4O60C)>&FaQ7m diff --git a/Code-C/power.c b/Code-C/power.c index 0eff51c..7e62f21 100644 --- a/Code-C/power.c +++ b/Code-C/power.c @@ -26,7 +26,7 @@ void power(int **p, double a[]){ } int main(int argc , char** argv){ int **p = getRawDataArray(nRow, nCol); - //printArray(p,nRow,nCol); + printArray(p,nRow,nCol); double pw[8]; power(p,pw); writePowerData(pw,8); diff --git a/Py-Script/puissance.py b/Py-Script/puissance.py index c00af9e..2a16584 100644 --- a/Py-Script/puissance.py +++ b/Py-Script/puissance.py @@ -28,7 +28,11 @@ with open('rawData.csv', mode ='r') as file: resultat*=resultat for i in range(8): aire = 0 + flag = False for j in range(taille-1): aire += (resultat[j,i]+resultat[j+1,i]) / 2 * periode + if(aire!=0 and flag == False): + flag = True + print(i , j , resultat[j,i] , resultat[j+1,i], aire) res = aire/temps print("power c°" + str(i+1) + " : " + str(res)) \ No newline at end of file