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] = e04mh('Nolist', lwsav, iwsav, rwsav);suppresses printing of this and subsequent options. Printing will automatically be turned on again after a call to nag_opt_lp_solve (e04mf) and may be turned on again at any time using the keyword List.
None.
Open in the MATLAB editor: e04mh_example
function e04mh_example fprintf('e04mh example results\n\n'); a = [1, 1, 1, 1, 1, 1, 1; 0.15, 0.04, 0.02, 0.04, 0.02, 0.01, 0.03; 0.03, 0.05, 0.08, 0.02, 0.06, 0.01, 0; 0.02, 0.04, 0.01, 0.02, 0.02, 0, 0; 0.02, 0.03, 0, 0, 0.01, 0, 0; 0.7, 0.75, 0.8, 0.75, 0.8, 0.97, 0; 0.02, 0.06, 0.08, 0.12, 0.02, 0.01, 0.97]; bl = [-0.01;-0.1; -0.01; -0.04; -0.1; -0.01; -0.01; -0.13;-1e25; -1e25; -1e25; -1e25; -0.0992;-0.003]; bu = [ 0.01; 0.15; 0.03; 0.02; 0.05; 1e25; 1e25; -0.13;-0.0049;-0.0064;-0.0037;-0.0012; 1e25; 0.002]; cvec = [-0.02; -0.2;-0.2; -0.2; -0.2; 0.04; 0.04]; istate = zeros(14, 1, 'int64'); x = [-0.01; -0.03; 0; -0.01; -0.1; 0.02; 0.01]; % Initialize and set options [cwsav,lwsav,iwsav,rwsav,ifail] = e04wb('e04mf'); [lwsav, iwsav, rwsav, inform] = e04mh(... 'Nolist', lwsav, iwsav, rwsav); [lwsav, iwsav, rwsav, inform] = e04mh(... 'Print Level = 0', lwsav, iwsav, rwsav); [lwsav, iwsav, rwsav, inform] = e04mh(... 'Check Frequency = 10', lwsav, iwsav, rwsav); [lwsav, iwsav, rwsav, inform] = ... e04mh('Infinite Bound Size = 1.0d+25', lwsav, iwsav, rwsav); [istate, x, iter, obj, ax, clamda, lwsav, iwsav, rwsav, ifail] = ... e04mf(... a, bl, bu, cvec, istate, x, lwsav, iwsav, rwsav); fprintf('Minimum value : %9.4f\n\n',obj); fprintf('Found after %3d iterations at x:\n ',iter); fprintf(' %9.4f',x); fprintf('\nLinear contrained values Ax:\n '); fprintf(' %9.4f',ax); fprintf('\n');
e04mh example results Minimum value : 0.0236 Found after 7 iterations at x: -0.0100 -0.1000 0.0300 0.0200 -0.0675 -0.0023 -0.0002 Linear contrained values Ax: -0.1300 -0.0055 -0.0066 -0.0048 -0.0039 -0.0992 -0.0030