#include "header.h" gsl_vector_float ReadVector() { char VectorFileName[MAXFILELEN]; //the file name of the input vector b gsl_vector_float Vector; int n; scanf("%s", VectorFileName); // read the file name of a vector FILE *fIn; // to read a file // the vector b is n by 1; the matrix A is n by m fIn=fopen(VectorFileName,"r"); // read the file of vector fscanf(fIn,"%d",&n); // get the size of the vector Vector=*gsl_vector_float_alloc(n); // b is n by 1 gsl_vector_float_fscanf (fIn,&Vector); // read values from the file to b fclose(fIn); return Vector; }