im trying to create 516 files in with the k loop, what is the correct syntax?
for k=1:516
fid = fopen("test.txt",'wt')
for j=1:5
formatSpec='%1.3f,%s,0,00,0\n%1.3f,%s,1,00,0\n%1.3f,%s,2,00,0\n';
fprintf(fid,formatSpec,time,a1,time,a2,time,a3)
time=time+0.001
end
fclose(fid);
end
Best Answer