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.
|
|
|
function writetofileprm(prmfile, outpath, pfstring, rundescription)
|
|
|
|
fid = fopen(fullfile(outpath,pfstring, [pfstring '_' rundescription '.PRM']),'w');
|
|
|
|
fprintf(fid,'C> *******************************************************\n');
|
|
|
|
fprintf(fid,'C> * SBEACH initial profile input file: %s.PRM *\n',[pfstring '_' rundescription]);
|
|
|
|
fprintf(fid,'C> *******************************************************\n');
|
|
|
|
fprintf(fid,'C>\n');
|
|
|
|
fprintf(fid,'C>\n');
|
|
|
|
fprintf(fid,'C> NUMBER OF POINTS\n');
|
|
|
|
fprintf(fid,'C> POSITION (m or ft), ELEVATION (m or ft)\n');
|
|
|
|
fprintf(fid,'E>----------------------------------------------------------------\n');
|
|
|
|
fprintf(fid,'%d\n',length(prmfile));
|
|
|
|
for ii = 1:length(prmfile)
|
|
|
|
if ii == length(prmfile)
|
|
|
|
fprintf(fid,'%4.3f %3.3f', prmfile(ii,1),prmfile(ii,2));
|
|
|
|
else
|
|
|
|
fprintf(fid,'%4.3f %3.3f\n', prmfile(ii,1),prmfile(ii,2));
|
|
|
|
end
|
|
|
|
end
|
|
|
|
fclose(fid);
|
|
|
|
end
|