comparison scripts/optimization/sqp.m @ 14327:4d917a6a858b stable

doc: Use Octave coding conventions in @example blocks of docstrings. * accumarray.m, accumdim.m, bar.m, base2dec.m, bincoeff.m, bitcmp.m, bitset.m, celldisp.m, chop.m, clabel.m, cloglog.m, colon.m, compass.m, computer.m, contour3.m, contourc.m, corr.m, cstrcat.m, ctime.m, cylinder.m, date.m, dec2base.m, demo.m, dir.m, dlmwrite.m, expm.m, ezcontourf.m, ezcontour.m, ezmeshc.m, ezmesh.m, ezplot.m, ezsurfc.m, ezsurf.m, feather.m, findobj.m, flipdim.m, fplot.m, genvarname.m, getfield.m, hankel.m, hilb.m, hist.m, idivide.m, index.m, int2str.m, interp1.m, is_leap_year.m, ismember.m, isocolors.m, isonormals.m, isosurface.m, kurtosis.m, legendre.m, linkprop.m, logit.m, logm.m, __makeinfo__.m, __marching_cube__.m, median.m, mkoctfile.m, moment.m, mpoles.m, orderfields.m, pcg.m, pcr.m, plot3.m, plotmatrix.m, polyaffine.m, polygcd.m, poly.m, polyout.m, print.m, qp.m, quadgk.m, qzhess.m, randi.m, rat.m, refreshdata.m, residue.m, rose.m, rot90.m, saveas.m, saveobj.m, shiftdim.m, skewness.m, spaugment.m, spdiags.m, sqp.m, stem.m, str2num.m, strcat.m, strjust.m, strread.m, strsplit.m, structfun.m, subplot.m, subsindex.m, substruct.m, surfl.m, surfnorm.m, svds.m, uimenu.m, union.m, voronoi.m, warning_ids.m, wblpdf.m: Use Octave coding conventions in @example blocks of docstrings.
author Rik <octave@nomad.inbox5.com>
date Sat, 04 Feb 2012 22:12:50 -0800
parents 72c96de7a403
children f3d52523cde1 69c0728def22
comparison
equal deleted inserted replaced
14325:a646cee995cf 14327:4d917a6a858b
31 ## @end tex 31 ## @end tex
32 ## @ifnottex 32 ## @ifnottex
33 ## 33 ##
34 ## @example 34 ## @example
35 ## @group 35 ## @group
36 ## min phi (x) 36 ## min phi (x)
37 ## x 37 ## x
38 ## @end group 38 ## @end group
39 ## @end example 39 ## @end example
40 ## 40 ##
41 ## @end ifnottex 41 ## @end ifnottex
42 ## subject to 42 ## subject to
47 ## @end tex 47 ## @end tex
48 ## @ifnottex 48 ## @ifnottex
49 ## 49 ##
50 ## @example 50 ## @example
51 ## @group 51 ## @group
52 ## g(x) = 0 52 ## g(x) = 0
53 ## h(x) >= 0 53 ## h(x) >= 0
54 ## lb <= x <= ub 54 ## lb <= x <= ub
55 ## @end group 55 ## @end group
56 ## @end example 56 ## @end example
57 ## 57 ##
58 ## @end ifnottex 58 ## @end ifnottex
59 ## @noindent 59 ## @noindent
100 ## @end tex 100 ## @end tex
101 ## @ifnottex 101 ## @ifnottex
102 ## 102 ##
103 ## @example 103 ## @example
104 ## @group 104 ## @group
105 ## [ d f(x) d f(x) d f(x) ] 105 ## [ d f(x) d f(x) d f(x) ]
106 ## transpose ( [ ------ ----- ... ------ ] ) 106 ## transpose ( [ ------ ----- ... ------ ] )
107 ## [ dx_1 dx_2 dx_N ] 107 ## [ dx_1 dx_2 dx_N ]
108 ## @end group 108 ## @end group
109 ## @end example 109 ## @end example
110 ## 110 ##
111 ## @end ifnottex 111 ## @end ifnottex
112 ## The fifth and sixth arguments, @var{lb} and @var{ub}, contain lower 112 ## The fifth and sixth arguments, @var{lb} and @var{ub}, contain lower
153 ## x(2)*x(3)-5*x(4)*x(5); 153 ## x(2)*x(3)-5*x(4)*x(5);
154 ## x(1)^3+x(2)^3+1 ]; 154 ## x(1)^3+x(2)^3+1 ];
155 ## endfunction 155 ## endfunction
156 ## 156 ##
157 ## function obj = phi (x) 157 ## function obj = phi (x)
158 ## obj = exp(prod(x)) - 0.5*(x(1)^3+x(2)^3+1)^2; 158 ## obj = exp (prod (x)) - 0.5*(x(1)^3+x(2)^3+1)^2;
159 ## endfunction 159 ## endfunction
160 ## 160 ##
161 ## x0 = [-1.8; 1.7; 1.9; -0.8; -0.8]; 161 ## x0 = [-1.8; 1.7; 1.9; -0.8; -0.8];
162 ## 162 ##
163 ## [x, obj, info, iter, nf, lambda] = sqp (x0, @@phi, @@g, []) 163 ## [x, obj, info, iter, nf, lambda] = sqp (x0, @@phi, @@g, [])