function writetofileelv(elvfile, outpath, pfstring) fid = fopen([outpath '\' pfstring '.ELV'],'w'); fprintf(fid,'C> *******************************************************\r\n'); fprintf(fid,'C> * SBEACH water elevation input file: %s.ELV *\r\n',pfstring); fprintf(fid,'C> *******************************************************\r\n'); fprintf(fid,'C>\r\n'); fprintf(fid,'C>\r\n'); fprintf(fid,'C> TOTAL WATER ELEVATION (m or ft)\r\n'); fprintf(fid,'E>----------------------------------------------------------------\r\n'); for ii = 1:length(elvfile) if ii == length(elvfile) fprintf(fid,'%.3f\r\n', elvfile(ii)); else fprintf(fid,'%.3f\r\n', elvfile(ii)); end end fclose(fid); end