You are on page 1of 1

function n=iterations_no(xl,xu,ead)

% Name :Rai Shaheryar Bhatti


% ID@20197217
% lab 2 question 1 part a

% xl=lowe bound
% xu=upper bound
% ead=desired error

n = log2(abs(xu-xl)/ead);

n=ceil(n)
end

You might also like