I made the code below
fileid = fopen('test.txt' , 'w');a = rand(2,2,2);fileid = fopen('test.txt' , 'w');for i = 1:2fprintf(fileid,num2str(i));fprintf(fileid,'\n');dlmwrite('test.txt',a(:,:,i),'-append','delimiter',' ');end
So the result like that
1295751 0.157610.96489 0.970590.95717 0.800280.48538 0.14189
I want a append immediately after i like that
195751 0.157610.96489 0.9705920.95717 0.800280.48538 0.14189
Any one can help me solve this problem?
Thanks
Best Answer