12.07.2015 Views

What Is Optimization Toolbox?

What Is Optimization Toolbox?

What Is Optimization Toolbox?

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2 Tutorial[fval,exitflag,output] = runqpbox4precto run the preceding code. After 18 iterations and 50 PCG iterations, thefunctionvaluehasthesamevaluetofivesignificantdigitsfval =-1.0538e+003but the first-order optimality is further reduced.output.firstorderopt =0.0028Note Decreasing TolPcg too much can substantially increase the number ofPCG iterations.Linear Least-Squares with Bound ConstraintsMany situations give rise to sparse linear least-squares problems, often withbounds on the variables. The next problem requires that the variables benonnegative. This problem comes from fitting a function approximation to apiecewise linear spline. Specifically, particles are scattered on the unit square.The function to be approximated is evaluated at these points, and a piecewiselinear spline approximation is constructed under the condition that (linear)coefficients are not negative. There are 2000 equations to fit on 400 variables:load particle % Get C, dlb = zeros(400,1);[x,resnorm,residual,exitflag,output] = ...lsqlin(C,d,[],[],[],[],lb);The default diagonal preconditioning works fairly well:exitflag =3resnorm =22.5794output =iterations: 102-72

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!