After changed the loop , print it (work good), after change the other loop, now I have a Segmentation fault a run time I see debugging. It must be about radius and theta. The code:
Code:
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;
The function where they are used I modified. When I arrive to print function I have the segmentation fault debugging
Code:
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;
}
...