This is currently how it is:

Code:

double **v; /* holds vertices of simplex */
double pn,qn; /* values used to create initial simplex */
double *f; /* value of function at each vertex */
double fr; /* value of function at reflection point */
double fe; /* value of function at expansion point */
double fc; /* value of function at contraction point */
double *vr; /* reflection - coordinates */
double *ve; /* expansion - coordinates */
double *vc; /* contraction - coordinates */
double *vm; /* centroid - coordinates */
double min;
double fsum,favg,s,cent;
/* dynamically allocate arrays */
/* allocate the rows of the arrays*/
v = (double **) malloc ((n+1) * sizeof(double *));
f = (double *) malloc ((n+1) * sizeof(double));
vr = (double *) malloc (n * sizeof(double));
ve = (double *) malloc (n * sizeof(double));
vc = (double *) malloc (n * sizeof(double));
vm = (double *) malloc (n * sizeof(double));
/* allocate the columns of the arrays*/
for (i=0;i<=n;i++) {
v[i] = (double *) malloc (n * sizeof(double));
}