Question: Q 1 function h = manning _ equation _ secant ( Q , s , b , n , h 1 , h 2 ,

Q1function h = manning_equation_secant(Q, s, b, n, h1, h2, epsilon_s) f = @(h) Q -(sqrt(s)*(b * h)^(5/3))/(n *(b +2* h)^(2/3)); while abs(h2- h1)> epsilon_s h = h2- f(h2)*(h2- h1)/(f(h2)- f(h1)); h1= h2; h2= h; endendQ =5;s =0.0002;b =20;n =0.03;h1=0;h2=2;epsilon_s =0.001;h = manning_equation_secant(Q, s, b, n, h1, h2, epsilon_s);h_values = linspace(0,1,100);Q_values =(sqrt(s)*(b * h_values).^(5/3))./(n *(b +2* h_values).^(2/3));figure;plot(h_values, Q_values, 'LineWidth', 2);xlabel('Depth (h)');ylabel('Flow (Q)');title('Manning Equation');grid on;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!