comparison scripts/optimization/sqp.m @ 9051:1bf0ce0930be

Grammar check TexInfo in all .m files Cleanup documentation sources to follow a few consistent rules. Spellcheck was NOT done. (but will be in another changeset)
author Rik <rdrider0-list@yahoo.com>
date Fri, 27 Mar 2009 22:31:03 -0700
parents eb63fbe60fab
children 923c7cb7f13f
comparison
equal deleted inserted replaced
9044:656ad518f385 9051:1bf0ce0930be
27 ## @end tex 27 ## @end tex
28 ## @end iftex 28 ## @end iftex
29 ## @ifnottex 29 ## @ifnottex
30 ## 30 ##
31 ## @example 31 ## @example
32 ## @group
32 ## min phi (x) 33 ## min phi (x)
33 ## x 34 ## x
35 ## @end group
34 ## @end example 36 ## @end example
35 ## 37 ##
36 ## @end ifnottex 38 ## @end ifnottex
37 ## subject to 39 ## subject to
38 ## @iftex 40 ## @iftex
43 ## @end tex 45 ## @end tex
44 ## @end iftex 46 ## @end iftex
45 ## @ifnottex 47 ## @ifnottex
46 ## 48 ##
47 ## @example 49 ## @example
50 ## @group
48 ## g(x) = 0 51 ## g(x) = 0
49 ## h(x) >= 0 52 ## h(x) >= 0
50 ## lb <= x <= ub 53 ## lb <= x <= ub
54 ## @end group
51 ## @end example 55 ## @end example
52 ## @end ifnottex 56 ## @end ifnottex
53 ## 57 ##
54 ## @noindent 58 ## @noindent
55 ## using a successive quadratic programming method. 59 ## using a successive quadratic programming method.
124 ## $$ 128 ## $$
125 ## @end tex 129 ## @end tex
126 ## @end iftex 130 ## @end iftex
127 ## @ifnottex 131 ## @ifnottex
128 ## @example 132 ## @example
133 ## @group
129 ## [ d f(x) d f(x) d f(x) ] 134 ## [ d f(x) d f(x) d f(x) ]
130 ## transpose ( [ ------ ----- ... ------ ] ) 135 ## transpose ( [ ------ ----- ... ------ ] )
131 ## [ dx_1 dx_2 dx_N ] 136 ## [ dx_1 dx_2 dx_N ]
137 ## @end group
132 ## @end example 138 ## @end example
133 ## @end ifnottex 139 ## @end ifnottex
134 ## 140 ##
135 ## The fifth and sixth arguments are vectors containing lower and upper bounds 141 ## The fifth and sixth arguments are vectors containing lower and upper bounds
136 ## on @var{x}. These must be consistent with equality and inequality 142 ## on @var{x}. These must be consistent with equality and inequality
137 ## constraints @var{g} and @var{h}. If the bounds are not specified, or are 143 ## constraints @var{g} and @var{h}. If the bounds are not specified, or are
138 ## empty, they are set to -@var{realmax} and @var{realmax} by default. 144 ## empty, they are set to -@var{realmax} and @var{realmax} by default.
139 ## 145 ##
140 ## The seventh argument is max. number of iterations. If not specified, 146 ## The seventh argument is max. number of iterations. If not specified,
141 ## the default value is 100. 147 ## the default value is 100.
142 ## 148 ##
143 ## The eighth argument is tolerance for stopping criteria. If not specified, 149 ## The eighth argument is tolerance for stopping criteria. If not specified,
144 ## the default value is @var{eps}. 150 ## the default value is @var{eps}.
145 ## 151 ##
146 ## Here is an example of calling @code{sqp}: 152 ## Here is an example of calling @code{sqp}:
147 ## 153 ##
148 ## @example 154 ## @example
155 ## @group
149 ## function r = g (x) 156 ## function r = g (x)
150 ## r = [ sumsq(x)-10; 157 ## r = [ sumsq(x)-10;
151 ## x(2)*x(3)-5*x(4)*x(5); 158 ## x(2)*x(3)-5*x(4)*x(5);
152 ## x(1)^3+x(2)^3+1 ]; 159 ## x(1)^3+x(2)^3+1 ];
153 ## endfunction 160 ## endfunction
175 ## lambda = 182 ## lambda =
176 ## 183 ##
177 ## -0.0401627 184 ## -0.0401627
178 ## 0.0379578 185 ## 0.0379578
179 ## -0.0052227 186 ## -0.0052227
187 ## @end group
180 ## @end example 188 ## @end example
181 ## 189 ##
182 ## The value returned in @var{info} may be one of the following: 190 ## The value returned in @var{info} may be one of the following:
183 ## @table @asis 191 ## @table @asis
184 ## @item 101 192 ## @item 101