% Calculate the settling error as a function of time. syms('n', 't', 'epsilon_s', 'tau_s'); % Define symbolic variables eps = 1-gainStepExpr; % Calculate the relative settling error taus = solve(eps-2^-n, t); % Calculate the settling time htmlPage('Settling time'); % Start a html page head2html('Settling time to n-bits'); % Put a heading on it % Put some text on the page and write the equations on the page text2html('The relative settling error versus time can be founs as:'); eqn2html(epsilon_s, eps); text2html('The settling time to $n$ bit can be found as the solution of:'); eqn2html(epsilon_s, 2^-n); text2html('This yields:'); eqn2html(tau_s, taus);