clear all;

inclination = [10:5:60]; % Defining inclination

g = 9.8;

% Calculating ce d = 2

D = @(d, theta) (d / 2)*(1 – cos(theta));

ce i = 1:numel(angle)

Dc1(i) = feval(D, 2, deg2rad(angle(i)));

end

% Calculating Q1 ce d = 2

ce i = 1:numel(Dc1)

Q1(i) = (2^(3/2)*Dc1(i)^(5/2)*sqrt(g).*(deg2rad(angle(i)) …

– 0.5.*sin(2*deg2rad(angle(i)))).^(3/2) ) / …

( 8*sqrt(sin(deg2rad(angle(i)))).*((1 – cos(deg2rad(angle(i)))).^(5 / 2)) );

end

% Calculating ce d = 4

ce i = 1:numel(angle)

Dc2(i) = feval(D, 4, deg2rad(angle(i)));

end

% Calculating Q2 ce d = 4

ce i = 1:numel(Dc2)

Q2(i) = (2^(3/2)*Dc2(i)^(5/2)*sqrt(g).*(deg2rad(angle(i)) …

– 0.5.*sin(2*deg2rad(angle(i)))).^(3/2) ) / …

( 8*sqrt(sin(deg2rad(angle(i)))).*((1 – cos(deg2rad(angle(i)))).^(5 / 2)) );

end

fprintf(‘ttbisection 2mttbisection 4mn’);

fprintf(‘thetatQ m/stttQ m/snn’);

ce j = 1:numel(Q1)

fprintf(‘%dtt%.4fttt%.4fn’, inclination(j), Q1(j), Q2(j));

end

**OUTPUT**