%Task5and6 % %For Task 5 %Make a plot of the relationship between velocity and channel roughness, %all other variables constant. Vary the roughness from that of a smooth %glass chute to a mountain stream. How does the velocity vary with %roughness. %For Task 6 %Make a plot of the relationship between discharge and channel roughness, %all other variables constant. Vary the roughness from that of a smooth %glass chute to a mountain stream. How does the discharge vary with %roughness? % %Author: Wendy Bohon with significant help from David Raleigh; Feb. 26, %2009 %This is the function and the variables function task5and6(width , depth , roughnesses , slope , verbose) %if statement to make sure that roughness is a vector and thus can be %varied if length(roughnesses) < 2 error('roughnesses should be a vector') end %This calls task1 [discharges velocities hydralicRadius] = task1(width , depth , roughnesses , slope , verbose) %This plots figure 4, which is the change in velocity with changes in %channel roughness figure(4) plot(roughnesses , velocities , 'xg-') title('Change in Velocity with Varying Roughness') xlabel('Roughness') ylabel('Velocity') print('roughnessesVelocity') hold %This plots figure 5 which is change in discharge with changing velocity figure (5) plot(discharges , velocities , 'ob-') title('Change in Discharge with Varying Channel Roughness') xlabel('Discharge') ylabel('Channel Roughness') print('dischargeroughness')