diff --git a/Code-C/power b/Code-C/power index 2fea944..974d246 100755 Binary files a/Code-C/power and b/Code-C/power differ diff --git a/Code-C/power.c b/Code-C/power.c index 78021db..0eff51c 100644 --- a/Code-C/power.c +++ b/Code-C/power.c @@ -11,16 +11,17 @@ void power(int **p, double a[]){ printf("temps : %f\n",temps);*/ //Fill array with the power of the signal for each captor - for(int i = 1; i < nCol; i++){ + for(int i = 0; i < nCol-1; i++){ int j = 0; a[i] = 0; while(j < nRow-1){ - double aire = ( pow(p[j][i],2) + pow(p[j+1][i],2) ) / 2 * periode; + double aire = ( pow(p[j][i+1],2) + pow(p[j+1][i+1],2) ) / 2 * periode; //printf("aire [%d,%d] : %f\n",j,i,aire); a[i] += aire; j++; } a[i] *= temps; + //printf("%f\n", a[i]); } } int main(int argc , char** argv){