Print Level = 1is an example of a string used to set an optional parameter. For each option the string contains one or more of the following items:
– | a mandatory keyword; |
– | a phrase that qualifies the keyword; |
– | a number that specifies an integer or double value. Such numbers may be up to contiguous characters in Fortran's I, F, E or D formats, terminated by a space if this is not the last item on the line. |
[lwsav, iwsav, rwsav, inform] = e04ne('Nolist', lwsav, iwsav, rwsav);suppresses printing of this and subsequent options. Printing will automatically be turned on again after a call to nag_opt_lsq_lincon_solve (e04nc) and may be turned on again at any time using the keyword List.
None.
Open in the MATLAB editor: e04ne_example
function e04ne_example fprintf('e04ne example results\n\n'); % Problem specification n = 9; m = 9; nclin = 3; c = [1, 1, 1, 1, 1, 1, 1, 1, 4; 1, 2, 3, 4, -2, 1, 1, 1, 1; 1, -1, 1, -1, 1, 1, 1, 1, 1]; bl(1:n+nclin) = -2; bu(1:n) = 2; bu(n+1:n+nclin) = [1.5; 1.5; 4]; cvec(1:n) = [-4; -1; -1; -1; -1; -1; -1; -0.1; -0.3]; istate = zeros(n+nclin, 1, 'int64'); kx = zeros(n, 1, 'int64'); x = zeros(n,1); a = zeros(m,n); a(1:5,1:5) = [2 1 1 1 1; 1, 2, 1, 1, 1; 1, 1, 2, 1, 1; 1, 1, 1, 2, 1; 1, 1, 1, 1, 2]; b = [0]; % Initialize and set options [cwsav,lwsav,iwsav,rwsav,ifail] = e04wb('e04nc'); [lwsav, iwsav, rwsav, inform] = e04ne(... 'NoList', lwsav, iwsav, rwsav); [lwsav, iwsav, rwsav, inform] = e04ne(... 'Problem Type = QP2', lwsav, iwsav, rwsav); [lwsav, iwsav, rwsav, inform] = e04ne(... 'Iteration Limit = 30', lwsav, iwsav, rwsav); [lwsav, iwsav, rwsav, inform] = e04ne(... 'Print Level = 0', lwsav, iwsav, rwsav); [lwsav, iwsav, rwsav, inform] = e04ne(... 'Infinite Bound Size = 1d25', lwsav, iwsav, rwsav); [istate, kx, x, a, b, iter, obj, clamda, lwsav, iwsav, rwsav, ifail] = ... e04nc(... c, bl, bu, cvec, istate, kx, x, a, b, lwsav, iwsav, rwsav); fprintf('Minimum value : %9.4f\n\n',obj); fprintf('Found after %3d iterations at x:\n',iter); fprintf(' %9.4f %9.4f %9.4f\n',x);
e04ne example results Minimum value : -8.0678 Found after 12 iterations at x: 2.0000 -0.2333 -0.2667 -0.3000 -0.1000 2.0000 2.0000 -1.7778 -0.4556