friction MATLAB code to compute the Darcy-Weisbach friction factor. Download and copy to the MATLAB working folder, then execute "help friction" and "help roughness".