None.
Cases prefixed with W are classified as warnings and do not generate an error of type NAG:error_n. See nag_issue_warnings.
Open in the MATLAB editor: c02aj_example
function c02aj_example fprintf('c02aj example results\n\n'); % Roots of x^2 + 3*x - 10 = 0 a = 1; b = 3; c = -10; [zsm, zlg, ifail] = c02aj(a, b, c); disp('Roots of the quadratic equation:'); if (zsm(2) == 0) % two real roots z(1) = zsm(1); z(2) = zlg(1); else % two complex roots z(1) = zsm(1) + i*zsm(2); z(2) = zlg(1) + i*zlg(2); end disp(z');
c02aj example results Roots of the quadratic equation: 2 -5