Question: table doesn't store all the values

Hello ,

I need your help , I have this loops and I  want to save data to a file , but the table save just the last one 

this is the code

thank you

for i from 1 by 1 to 3 do 
Q:=[]:
simplfloat:=rand(-1.0..1.0): 
a:=simplfloat():     
eq:=a+i:
Q:=[op(Q),[i,a,eq]]:
writedata("all.dat", Q):
end do;


exemple.mw

Please Wait...