Question: problem writing to a file

Hi All,

I am new to maple and I am having problems writing to a file, the problem that i am having is that maple rounds
the small numbers into 0 when I write into a file but does not round if it outputs to the screen,
how can I get the screen output written in a file? Also, is it possible to write to a comma delimited file ".csv".  the code is below

I apprreciate your help

 

##############################################
file := fopen("table.txt",'WRITE');  
f:=(k,m,a)->expression;

for k from 0 to 100 do
J(k):=evalf(subs(f(k,200,1/200)));

  fprintf(file,"%f\n", J(k));
  end do;

fclose(file);
 

##############################################

Please Wait...