same as precedent
This commit is contained in:
parent
64c27e2683
commit
7773288b49
BIN
Code-C/power
BIN
Code-C/power
Binary file not shown.
|
@ -26,7 +26,7 @@ void power(int **p, double a[]){
|
||||||
}
|
}
|
||||||
int main(int argc , char** argv){
|
int main(int argc , char** argv){
|
||||||
int **p = getRawDataArray(nRow, nCol);
|
int **p = getRawDataArray(nRow, nCol);
|
||||||
//printArray(p,nRow,nCol);
|
printArray(p,nRow,nCol);
|
||||||
double pw[8];
|
double pw[8];
|
||||||
power(p,pw);
|
power(p,pw);
|
||||||
writePowerData(pw,8);
|
writePowerData(pw,8);
|
||||||
|
|
|
@ -28,7 +28,11 @@ with open('rawData.csv', mode ='r') as file:
|
||||||
resultat*=resultat
|
resultat*=resultat
|
||||||
for i in range(8):
|
for i in range(8):
|
||||||
aire = 0
|
aire = 0
|
||||||
|
flag = False
|
||||||
for j in range(taille-1):
|
for j in range(taille-1):
|
||||||
aire += (resultat[j,i]+resultat[j+1,i]) / 2 * periode
|
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
|
res = aire/temps
|
||||||
print("power c°" + str(i+1) + " : " + str(res))
|
print("power c°" + str(i+1) + " : " + str(res))
|
Loading…
Reference in a new issue