Question: Error, (in fprintf) number expected for floating point format

Hello,

I am trying to pass the graphics to .txt format so that I can plot them in Origin (OriginLab).

npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    PA[i] := x[i](t);
    printf("%e %e\n", t[i], PA[i]);
    fprintf(fd, "%e %e\n", t[i], PA[i]);
end do;
0.000000e+00 

Error, (in fprintf) number expected for floating point format
fclose(fd);
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    PB[i] := x[i + n](t);
    printf("%e %e\n", t[i], PB[i]);
    fprintf(fd, "%e %e\n", t[i], PB[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    qA[i] := x[i + 2*n](t);
    printf("%e %e\n", t[i], qA[i]);
    fprintf(fd, "%e %e\n", t[i], qA[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    qB[i] := x[i + 3*n](t);
    printf("%e %e\n", t[i], qB[i]);
    fprintf(fd, "%e %e\n", t[i], qB[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    Tg[i] := x[i + 4*n](t);
    printf("%e %e\n", t[i], Tg[i]);
    fprintf(fd, "%e %e\n", t[i], Tg[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    Ts[i] := x[i + 5*n](t);
    printf("%e %e\n", t[i], Ts[i]);
    fprintf(fd, "%e %e\n", t[i], Ts[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format

trabalho_final_2019.mw

Please Wait...