


Report wentworth class of a particular grain size phi
function wentworth(phi)
DESCRIPTION:
Report the wentworth of a grain size phi
INPUT:
phi: sediment grain size in phi scale
OUTPUT:
prints wentworth class to screen
EXAMPLE USAGE
wentworth(2.5)
Author(s):
Geoff Cowles (University of Massachusetts Dartmouth)
Revision history
==============================================================================

0001 function Sclass = ST_wentworth(phi) 0002 % Report wentworth class of a particular grain size phi 0003 % 0004 % function wentworth(phi) 0005 % 0006 % DESCRIPTION: 0007 % Report the wentworth of a grain size phi 0008 % 0009 % INPUT: 0010 % phi: sediment grain size in phi scale 0011 % 0012 % OUTPUT: 0013 % prints wentworth class to screen 0014 % 0015 % EXAMPLE USAGE 0016 % wentworth(2.5) 0017 % 0018 % Author(s): 0019 % Geoff Cowles (University of Massachusetts Dartmouth) 0020 % 0021 % Revision history 0022 % 0023 %============================================================================== 0024 0025 global ftbverbose 0026 [~, subname] = fileparts(mfilename('fullpath')); 0027 if ftbverbose 0028 fprintf('\nbegin : %s\n', subname) 0029 end 0030 0031 ClassNames = {'boulder','cobble','pebble','granule','very coarse sand', ... 0032 'coarse sand','medium sand','fine sand','very fine sand','coarse silt', ... 0033 'medium silt','fine silt','very fine silt','coarse clay','medium clay','fine clay'}; 0034 ClassLbound = [-1e6,-8,-6,-2,-1,0,1,2,3,4,5,6,7,8,9,10]; 0035 pts = find(phi-ClassLbound > 0); 0036 ClassIndex = pts(end); 0037 Sclass = char(ClassNames{ClassIndex}); 0038 %fprintf('class of phi = %f is: %s\n',phi,class); 0039 0040 if ftbverbose 0041 fprintf('end : %s\n', subname) 0042 end