As Mohammad said in the comments, you should change the name of the output file in each iteration:
i = 0;
while(1)
i=i+1;
tic
A = rand(1,5)
disp(A);
File_id = fopen(['delay_' str(i) '.dat'], 'w');
fwrite(File_id, A, 'double');
fclose(File_id);
File_id = fopen('test.dat', 'r');
A = fread(File_id,'double=>int8');
fclose(File_id);
disp(A);
T=toc;
pause(300-T)
end