#include "header.h" gsl_vector_float ReadVector() { char VectorFileName[MAXFILELEN]; //declare the file name gsl_vector_float Vector; //declare a temporary vector int n; scanf("%s", VectorFileName); // read the vector file name from the data file FILE *fIn; // declare the file fIn=fopen(VectorFileName,"r"); fscanf(fIn,"%d",&n); // reads the size of the vector from the file Vector=*gsl_vector_float_alloc(n); // allocate memory for the vector gsl_vector_float_fscanf (fIn,&Vector); // read values from the file to the vector fclose(fIn); return Vector; }