%task4 % %Makes a plot of the relationship between velocity and hydraulic radius, % all other variables constant. Allows you to choose a range of radius values that are % for shallow and deep channels. To answer the question, All things being equal, is the velocity % faster in a deeper or shallower channel? % %Author: Wendy Bohon with significant help from David Raleigh, Feb. 26, %2009. function task4(width , shallowestDepth , deepestDepth , interval) % vector of depths. Put in the shallowest deoth, the spacing interval for % plotting the data and then the deepest depth. It works the best if you % put in significantly different depths. depths = [shallowestDepth:interval:deepestDepth]; %Hydralic Radius (R)= (w*d)/(w+2d) ; which is also A/P hydraulicRadius = (width .* depths) ./ (width + 2 .* depths) %This plots up a figure showing the relationship between velocity and %hydraulic radius with all other variables being held steady. figure (3) plot(depths , hydraulicRadius , '*k--') title('Relationship Between Velocity and Hydrulic Radius') xlabel('Hydraulic Radius') ylabel('Velocity') print('radiusVelocity')