【正文】
ition: ? ? 0 indicates that the function converged to a solution x. ? ?0 indicates that the maximum number of function evaluations or iterations was reached. ? ? 0 indicates that the function did not converge to a solution. Output A structure whose fields contain information about the optimization: ? – The number of iterations taken. ? – The number of function evaluations. ? – The algorithm used. ? – The number of PCG iterations (largescale algorithm only). ? – The final step size taken (mediumscale algorithm only). ? – A measure of firstorder optimality: the norm of the gradient at the solution x. options ? ?Display – Level of display. 39。 39。 39。off39。off39。on39。,4,options)。 ? x = fminunc(39。on39。GradObj39。on39。 ? g = cos(x)。),4)。 FUN can also be an inline object: ? x = fminunc(inline(39。on39。GradObj39。on39。myfun39?!?x)39。,0,5) ? This generates the solution ? x = 3 ? The value at the minimum is ? y = f(x) ? y = –1 Limitations ? The function to be minimized must be continuous. ? fminbnd may only give local solutions. ? fminbnd often exhibits slow convergence when the solution is on a boundary of the interval. In such a case, fmincon often gives faster and more accurate solutions. ? fminbnd only handles real variables. 無約束非線性規(guī)劃問題 ?無約束最優(yōu)化問題應(yīng)用:參數(shù)反演問題、有約束最優(yōu)化問題轉(zhuǎn)換成無約束最優(yōu)化問題 直接搜索法 梯度法 適合于目標(biāo)函數(shù)高度非線性、無導(dǎo)數(shù)或?qū)?shù)難于計算,收斂速度慢,單純形法、HookeJeeves搜索法、 Pavell共軛方向法 最速下降法、 Newton法、 Marquart法、共軛梯度法、擬牛頓法 (確定搜索方向) Hess矩陣的更新、一維搜索階段 概述 MATLAB函數(shù) fminunc ? Find the minimum of an unconstrained multivariable function ? where x is a vector and f(x) is a function that returns a scalar. x = fminunc(fun,x0) x = fminunc(fun,x0,options) x = fminunc(fun,x0,options,P1,P2,...) [x,fval] = fminunc(...) [x,fval,exitflag] = fminunc(...) [x,fval,exitflag,output] = fminunc(...) [x,fval,exitflag,output,grad] = fminunc(...) [x,fval,exitflag,output,grad,hessian]= fminunc(...) fun The function to be minimized. fun takes a vector x and returns a scalar value f of the objective function evaluated at x. You can specify fun to be an inline object. x = fminunc(inline(39。 ? Next, call