You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
807 B
Matlab

7 years ago
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