/* function to create a 2d float array */ #include float **alloc_2d_float(int rows, int cols) { float *data = (float *) malloc(rows*cols*sizeof(float)); float **array = (float **) malloc(rows*sizeof(float *)); int i; for (i=0; i