What Is Optimization Toolbox?
What Is Optimization Toolbox? What Is Optimization Toolbox?
fgoalattain“Avoiding Global Variables via Anonymous and Nested Functions” onpage 2-20 explains how to parameterize the objective function fun, ifnecessary.Note If the specified input bounds for a problem are inconsistent, theoutput x is x0 and the output fval is [].InputArguments“Function Arguments” on page 6-2 contains general descriptionsof arguments passed into fgoalattain. This section providesfunction-specific details for fun, goal, nonlcon, options, andweight:8-14
fgoalattainfunThefunctiontobeminimized. fun is a function thataccepts a vector x and returns a vector F, theobjectivefunctions evaluated at x. The function fun can be specifiedas a function handle for an M-file functionx = fgoalattain(@myfun,x0,goal,weight)where myfun is a MATLAB function such asfunction F = myfun(x)F = ... % Compute function values at x.fun can also be a function handle for an anonymousfunction.x = fgoalattain(@(x)sin(x.*x),x0,goal,weight);If the user-defined values for x and F are matrices, they areconverted to a vector using linear indexing.Tomakeanobjectivefunctionasnearaspossibletoagoal value, (i.e., neither greater than nor less than) useoptimset to set the GoalsExactAchieve option to thenumber of objectives required to be in the neighborhood ofthe goal values. Such objectives must be partitioned intothe first elements of the vector F returned by fun.If the gradient of the objective function can also becomputed and the GradObj option is 'on', assetbyoptions = optimset('GradObj','on')then the function fun must return, in the second outputargument, the gradient value G, amatrix,atx. Notethatby checking the value of nargout the function can avoidcomputing G when fun is called with only one outputargument (in the case where the optimization algorithmonly needs the value of F but not G).function [F,G] = myfun(x)F = ...% Compute the function values at xif nargout > 1 % Two output argumentsG = ...% Gradients evaluated at xendThe gradient consists of the partial derivative dF/dx ofeach F at the point x. IfF is a vector of length m and x has8-15
- Page 247 and 248: Optimization Tool ExamplesOptimizat
- Page 249 and 250: Optimization Tool Examples6 In the
- Page 251 and 252: Optimization Tool Examplesmax Line
- Page 253 and 254: Optimization Tool ExamplesThe Aeq a
- Page 255 and 256: 6Argument and OptionsReferenceThis
- Page 257 and 258: Function ArgumentsInput Arguments (
- Page 259 and 260: Function ArgumentsInput Arguments (
- Page 261 and 262: Function ArgumentsOutput Arguments
- Page 263 and 264: Optimization OptionsOptimization Op
- Page 265 and 266: Optimization OptionsOptimization Op
- Page 267 and 268: Optimization OptionsOptimization Op
- Page 269 and 270: Optimization OptionsOptimization Op
- Page 271 and 272: Optimization Optionsspecifies Outpu
- Page 273 and 274: Optimization OptionsoptimValues Fie
- Page 275 and 276: Optimization OptionsoptimValues Fie
- Page 277 and 278: Optimization OptionsoptimValues Fie
- Page 279 and 280: Optimization OptionsStopping an Opt
- Page 281 and 282: 7Functions — By CategoryMinimizat
- Page 283 and 284: Least Squares (Curve Fitting)Least
- Page 285 and 286: Functions — AlphabeticalList8
- Page 287 and 288: intprogx = bintprog(f,A,b,Aeq,Beq,x
- Page 289 and 290: intprogBranchStrategyStrategy the a
- Page 291 and 292: intprog• Verifies that no better
- Page 293 and 294: intprogExampleTo minimize the funct
- Page 295 and 296: colorPurposeSyntaxDescriptionColumn
- Page 297: fgoalattainx = fgoalattain(fun,x0,g
- Page 301 and 302: fgoalattainfunction [c,ceq,GC,GCeq]
- Page 303 and 304: fgoalattainattainfactorexitflaglamb
- Page 305 and 306: fgoalattainFunValCheckGoalsExactAch
- Page 307 and 308: fgoalattainExamplesConsider a linea
- Page 309 and 310: fgoalattainof overattainment is met
- Page 311 and 312: fgoalattainLimitationsReferencesThe
- Page 313 and 314: fminbndInputArguments“Function Ar
- Page 315 and 316: fminbndPlotFcnsPlots various measur
- Page 317 and 318: fminbndLimitationsReferencesThe fun
- Page 319 and 320: fminconx = fmincon(fun,x0,A,b) star
- Page 321 and 322: fminconfunThe function to be minimi
- Page 323 and 324: fminconthen the function nonlcon mu
- Page 325 and 326: fmincongradhessianlambdaoutputGradi
- Page 327 and 328: fminconthe values of these fields i
- Page 329 and 330: fminconHessianHessMultIf 'on', fmin
- Page 331 and 332: fminconPrecondBandWidth Upper bandw
- Page 333 and 334: fminconSince both constraints are l
- Page 335 and 336: fmincon• A dense (or fairly dense
- Page 337 and 338: fminconReferences[1] Coleman, T.F.
- Page 339 and 340: fminimaxx = fminimax(fun,x,A,b,Aeq,
- Page 341 and 342: fminimaxfunThe function to be minim
- Page 343 and 344: fminimaxIf nonlcon returns a vector
- Page 345 and 346: fminimaxlambdamaxfvaloutputStructur
- Page 347 and 348: fminimaxMeritFunctionMinAbsMaxOutpu
fgoalattain“Avoiding Global Variables via Anonymous and Nested Functions” onpage 2-20 explains how to parameterize the objective function fun, ifnecessary.Note If the specified input bounds for a problem are inconsistent, theoutput x is x0 and the output fval is [].InputArguments“Function Arguments” on page 6-2 contains general descriptionsof arguments passed into fgoalattain. This section providesfunction-specific details for fun, goal, nonlcon, options, andweight:8-14