% fundyout.m
% Write the files out in proper format
%filename = 'mesh'

ntype = zeros(length(meshnod),1);
ntype(bndele(:,2)) = bndele(:,5);

meshnode = [meshnod ntype bathy(:,2)];

fid = fopen([filename,'.node'],'wt');
fprintf(fid,[' ',int2str(length(meshnod)),' \n']);
fprintf(fid,[' 16 \n']);
fprintf(fid,[' 999 \n']);
fprintf(fid,' %6i %9.4f %9.4f %6i %9.4f\n',meshnode');
fclose(fid);


for i = 1:length(bcs)
disp(['      U(',int2str(bcs(i,1)),')=',num2str(bcs(i,2)),...
   '*CEXP(EYE*FAC*(',num2str(bcs(i,3)),' ) )' ])
end

