First, the arrays have to be pointers so that they can be allocated at runtime. For example:
float *x[2]; float * fx[2],
Next, after finding the upper_limit (line 26) you can use malloc to allocate the arrays of the proper size
int i;
for(i = 0; i < 2; i++)
{
x[i] = malloc(upper_limit * sizeof(float));
fx[i] = malloc(upper_limit * sizeof(float));
}
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343