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.
20 lines
941 B
Matlab
20 lines
941 B
Matlab
function writetofilepri(prifile, outpath, namestr)
|
|
fid = fopen([outpath '\' namestr '.PRI'],'w');
|
|
fprintf(fid,'C> *******************************************************\r\n');
|
|
fprintf(fid,'C> * SBEACH initial profile input file: %s.PRI *\r\n',namestr);
|
|
fprintf(fid,'C> *******************************************************\r\n');
|
|
fprintf(fid,'C>\r\n');
|
|
fprintf(fid,'C>\r\n');
|
|
fprintf(fid,'C> NUMBER OF POINTS\r\n');
|
|
fprintf(fid,'C> POSITION (m or ft), ELEVATION (m or ft)\r\n');
|
|
fprintf(fid,'E>----------------------------------------------------------------\r\n');
|
|
fprintf(fid,'%d\r\n',length(prifile));
|
|
for ii = 1:length(prifile)
|
|
if ii == length(prifile)
|
|
fprintf(fid,'%.3f %.3f\r\n', prifile(ii,1),prifile(ii,2));
|
|
else
|
|
fprintf(fid,'%.3f %.3f\r\n', prifile(ii,1),prifile(ii,2));
|
|
end
|
|
end
|
|
fclose(fid);
|
|
end |