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
848 B
Matlab
18 lines
848 B
Matlab
function writetofilewav(wavfile, outpath, pfstring)
|
|
fid = fopen([outpath '\' pfstring '.WAV'],'w');
|
|
fprintf(fid,'C> *******************************************************\r\n');
|
|
fprintf(fid,'C> * SBEACH wave input file: %s.WAV *\r\n',pfstring);
|
|
fprintf(fid,'C> *******************************************************\r\n');
|
|
fprintf(fid,'C>\r\n');
|
|
fprintf(fid,'C>\r\n');
|
|
fprintf(fid,'C> HEIGHT (m or ft), PERIOD (sec)\r\n');
|
|
fprintf(fid,'E>----------------------------------------------------------------\r\n');
|
|
for ii = 1:length(wavfile)
|
|
if ii == length(wavfile)
|
|
fprintf(fid,'%.3f %.3f\r\n', wavfile(ii,1),wavfile(ii,2));
|
|
else
|
|
fprintf(fid,'%.3f %.3f\r\n', wavfile(ii,1),wavfile(ii,2));
|
|
end
|
|
end
|
|
fclose(fid);
|
|
end |