Debugging I have an error at run time in this function:
void pre_filter_Computations(double **radius,double **theta,int cols,int rows){
double x[cols],y[rows];
double X[cols][rows], Y[cols][rows];
double epsilon=0.0001;
printf("Entering prefilter function\n");
for(int i=0;i<cols*2;i++){
x[i]=((double)(i-cols)/2/((double)cols/2;
}
...
I had to change this for loop. Before changing it running the project it enter and exit the function. But for an error in the loop, I had to change it and another similar. When I run again I can t enter the function. Debugging I have a Suspended Signal SIGSEGV : Segmantation Fault before entering the function at print line!
About theta and radius:
double** radius, **theta;
raidus=(double**)malloc(sizeof(double*)*rows);
for(int i=0;i<rows;i++);
radius[i]=(double*)malloc(sizeof(double)*cols);
theta=(double**)malloc(sizeof(double*)*rows);
for(int z=0;z<rows;z++);
theta[z]=(double*)malloc(sizeof(double)*cols);
Someone understand where is the error?