% Function to solve the design equations for Example 20.1 from "A First
% Course on Kinetics and Reaction Engineering" for both steps of the
% operating protocol
function Example_20_1
    % Solve the design equations for the first step
    [t_step1,z_step1] = Example_20_1_a;
    
    % Solve the design equations for the second step
    [t_step2,z_step2] = Example_20_1_b(z_step1);
    
    % Report the results
    display(['Total processing time (min): ',num2str(t_step1+t_step2)])
    net_rate = z_step2(2)/4/(t_step1 + t_step2 + 25);
    display(['Net rate of B production (mol/min): ',num2str(net_rate)])
    
end % of Example_20_1

