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

Hi

I am getting the floating point error during the job running. it happens instantly for the first fopen command and after some calculations it happens for the second fopen command also.

I would be appreciated if you could help  me in this regards,

Thanks.

here is the code:

> restart;
> w := 0.5695419e-1; T := evalf(2*Pi/w); Cl := 137;
> A := -(int(sin(w*t), t));
> P0 := -subs(t = t1, A)/Cl;
> mrdot0 := int(P0+A/Cl, t = t1 .. t2);
> dtt := (1/4096)*T;
> fd := fopen("C:/Users/zyzhou/Desktop/t22.dat", WRITE, TEXT); for t1 by dtt to 81920 do t22 := solve(mrdot0, t2)*fprintf(fd, "%f,%f\n", t1, t22) end do; fclose(fd);
                                      0
Error, (in fprintf) number expected for floating point format


> mrdot1 := P0+2/Cl*(17.55797071*cos(0.5695419000e-1*solve(mrdot0, t2)));
> fd := fopen("C:/Users/zyzhou/Desktop/k22.dat", WRITE, TEXT); for t1 by dtt to 81920 do k22 := mrdot1; fprintf(fd, "%g,%g\n", t1, k22) end do; fclose(fd);

Please Wait...