Home > utilities > ST_example.m

ST_example

PURPOSE ^

Example usage of Sediment Toolbox

SYNOPSIS ^

function ST_example

DESCRIPTION ^

 Example usage of Sediment Toolbox

 function example

 DESCRIPTION:
    Demonstrate ST Toolbox functionality 

 INPUT:

 OUTPUT:
    
 Author(s):  
    Geoff Cowles (University of Massachusetts Dartmouth)

 Revision history
   
==============================================================================

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function ST_example
0002 % Example usage of Sediment Toolbox
0003 %
0004 % function example
0005 %
0006 % DESCRIPTION:
0007 %    Demonstrate ST Toolbox functionality
0008 %
0009 % INPUT:
0010 %
0011 % OUTPUT:
0012 %
0013 % Author(s):
0014 %    Geoff Cowles (University of Massachusetts Dartmouth)
0015 %
0016 % Revision history
0017 %
0018 %==============================================================================
0019 close all;
0020 fprintf('       phi          class       d(mm)    Dstar    wset(mm/s)  taucr (Pa)  erate x1e-3(kg/(m^2-s))\n')
0021 i = 0;
0022 for phi=-8:11
0023     i = i + 1;
0024     phiclass    = ST_wentworth(phi);
0025     d(i)        = ST_phi2d(phi);
0026     Dstar(i)    = ST_Dstar(d(i));
0027     Wset(i)     = ST_wset(d(i));
0028     Taucr(i)    = ST_taucr(d(i));
0029     erate(i)    = ST_erate(d(i));
0030     fprintf('%10d %20s %8.4f %8.2f %9.4f %8.3f %8.3f\n',phi,phiclass,d(i)*1000,Dstar(i),Wset(i)*1000,Taucr(i),1000*erate(i))
0031 end;
0032 
0033 loglog(d*1000,Taucr)
0034 title('critical shear stress')
0035 xlabel('Grain diameter (mm)')
0036 ylabel('critical shear Pa')
0037 axis([.01,10,.01,10])

Generated on Tue 18-Dec-2012 12:37:31 by m2html © 2005