Hi Ivan
> What I want to do is reading a plain text file with data in the format
>
> x1 y1
>
> x2 y2
>
> ... and such
If you definitely have the file in this format and you don't mind
using C++ instead of C, then you can read these files really easily
with something like,
[code]
double var1, var2;
std::ifstream myFile("filename.txt", std::ios::in);
while(!myFile.is_open()){
/* read the two elements one row at a time */
myFile << var1 << var2;
/* Insert stuff to get var1 and var2 into the right elements of the
gsl_vector here */
}
[/code]
Obviously, there should be error checking and stuff, but that's the basic idea.
Have fun
Kevin
--
Kevin Channon
School of Chemistry
University of Bristol
UK
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl