Thanks for your reply.
So far I couldn't achieve anything with fwrite, but I've tried the following:
(u is the variable i'm trying to write)
fprintf(fp,"%0.0f ", u);
But if I run, the output file looks like this:
Can you tell me where my mistake is?
EDIT: If I wirte %1.1f insted of %0.0f it works, even though the numbers all have a .0 (e.g. 5.0 or 4.0), but I can live with that.
Thanks for your help