% SBEACH toolbox - fsbeach_collectresults % Written by Joshua Simmons 11/2017 % Syntax: % sbout = fsbeach_collectresults(sblocs) % % Input: % sblocs = Cell array of locations where SBEACH has been run % Output: % sbout = structure with sbeach data; function sbout = fsbeach_collectresults(sblocs) for ii = 1:length(sblocs) fid = fopen([sblocs{ii} '.Excel.ASSUPPLIED'],'r'); formatSpec = '%f %f %f'; sizeA = [3 Inf]; tempresults = fscanf(fid,formatSpec,sizeA)'; fclose(fid); clear fid %get computed profile sbout.computed(ii).z(:,1) = tempresults(:,3); sbout.computed(ii).x = tempresults(:,1); %input bathy sbout.input(ii).x = tempresults(:,1); sbout.input(ii).z = tempresults(:,2); %now get wave elevations etc fid = fopen([sblocs{ii} '.XVR'],'r'); sbout.xvr(ii) = fsbeach_readxvrfile(fid); end end