I have written a function for FIR Filter which has an array as input and another array as output.This is my FIR Filter function here:
float * filter(float PATIENTSIGNAL[],float FILTERCOEF[])
I can use it without any problem, like the way hereunder:
float *FILTEROUT;
float FIROUT[8000];
FILTEROUT = filter(PATIENTSIGNAL, FILTERCOEF);
/* */
for (k = 0; k <= 1000; k++){
FIR[k] = 10 + FILTEROUT[k];
}
As you see I added number 10 to each element of my output array to evaluate that can I use this array for future computation,
But Here is my problem when I want use 2D array, This my function which return a 2D array correctly;
float(*Windowing(float SIGNAL[], int WINDOWSIZE));
I have used the Windowing function by this code in appropriate way:
patientwindow = Windowing(FILTEROUT, WINDOWSIZE);
and the all numbers in "patientwindow" array is correct but when I want to perform some simple operation like summation as here:
float evaluate[WINDOWSIZE][OVERLAP/4];
for (j = 0; j <= NUMBEROFWINDOWS; j++){
for (i = 0; i < WINDOWSIZE; i++){
evaluate[i][j] = 2+ (patientwindow[i][j]);
}
}
all elements of "evaluate" array are 0
;
Would you please help me?