power debug (column = 0)

This commit is contained in:
quentin.perret 2022-06-16 15:19:07 +02:00
parent 479289a365
commit efc3110b2d
3 changed files with 4 additions and 5 deletions

Binary file not shown.

View file

@ -9,7 +9,7 @@
#include "getArray.h"
bool rawDataWriteFlag;
int nRow = 4;
int nRow = 500;
int nCol = 1;
double freqEch = 250;

View file

@ -11,15 +11,14 @@
* @param powerArray array where results are stocked
*/
void powerCalculation(long **p, double powerArray[]){
printArrayData(p,nRow,nCol);
printf("data in pw : \n");
for(int i = 1; i < nCol; i++){
for(int i = 0; i < nCol; i++){
int j = 0;
powerArray[i] = 0;
while(j < nRow){
printf("%d , %d , %d , %d\n" , p[j][i] ,powerArray[i] , i ,j);
powerArray[i] + pow(p[j][i],2);
printf("\np[%d,%d] = %d\npwArray[%d] = %lf\n" , j,i,p[j][i+1],i,powerArray[i]);
powerArray[i] += pow(p[j][i+1],2);
j++;
}
powerArray[i] /= nRow;