Dear Gustavo,
Sorry I should have realized what was going on yesterday.
HyPhy actually can't properly read data from two files at once. It's definitely a limitation, but I hope not a major one. I should actually fix the issue (because fprintf to multiple files at once works well).
When you call fscanf, HyPhy does the following
1). Open the file
2). See if this file has been read from with the last call of fscanf
3). If (2) is true, advances the file pointer to a correct location, if not, leave the pointer at the beginning of the file
4). Reads from the file
5). Set END_OF_FILE if the end of the file has been reached.
Hence when you call fscanf on alternating files, (3) will always read from the beginning of the file.
Sorry for the confusion.
You can fix the problem with the code by writing two loops, or by calling
Code:fscanf (file1,"Lines",lines1);
fscanf (file2,"Lines",lines2);
This will read all lines in the file into column vectors, and then you can say
Code: for(k=0;k<72;k=k+1){
i = 0+lines1[k]; /* force string to number conversion */
fprintf (stdout," ",i);
j = 0 + lines2[k];
fprintf (stdout," ",j);
}
Cheers,
Sergei