3
Hello, Good Night
I am with a file . CSV simple, containing only two columns, separated by comma and by the new line, as an example:
0.001,-9.623
0.098,2.540
1.000,-1.002
And I need to separate them preferably into two vectors, or into a matrix (2 columns by 1300 rows). I tried to replace the commas with blank spaces but did not, as in the fraction
for(n = 0; n <= AMOSTRAS_LINHAS, n++)
{
fscanf(amostras, "%f %f", &tempo[n], &tensao[n])
}
The result of printing is always zero for both, I know the problem is in fscanf, but I can no longer see, there is also the possibility of using Strtok(), but I also did not see a solution with the same, if someone can clarify how to approach the problem, grateful.
Dear thank you very much, solutions I found were based on Strtok. Strong hug.
– FourZeroFive