The following should do the trick:
fid = fopen('c:\\coeffs.txt','wt'); % Note the 'wt' for writing in text mode
fprintf(fid,'%f\n',a); % The format string is applied to each element of a
fclose(fid);
For more info, check out the documentation for FOPEN and FPRINTF.