Checking the Candidate Residual

A scalar MATLAB solver accepts a candidate only when both its absolute displacement step and its absolute force residual meet their tolerances. At iteration 4 of a maximum of 20 iterations, its variables are:


MATLAB
x = 0.24985;      % m, previous estimate
xNew = 0.25000;   % m, candidate estimate
rOld = 0.040;     % N, residual at x
rNew = -0.080;    % N, residual at xNew
step = abs(xNew - x);
tolX = 0.00020;   % m
tolF = 0.050;     % N


Which expression correctly sets the logical variable converged according to this requirement?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Applications in Numerical Analysis Questions: