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.

1 Getting Started<strong>Optimization</strong> ExampleThis section presents an example that illustrates how to solve an optimizationproblem using the toolbox function lsqlin, which solves linear least squaresproblems. This section covers the following topics:• “The Problem” on page 1-4• “Setting Up the Problem” on page 1-4• “Finding the Solution” on page 1-5• “More Examples” on page 1-6The ProblemThe problem in this example is to find the point on the planethat is closest to the origin. The easiest way to solve this problem is tominimize the square of the distance from a pointon the planeto the origin, which returns the same optimal point as minimizing the actualdistance. Since the square of the distance from an arbitrary pointto the origin is, you can describe the problem as follows:subject to the constraintThe function f(x) iscalledtheobjective function andis anequality constraint. More complicated problems might contain other equalityconstraints, inequality constraints, and upper or lower bound constraints.Setting Up the ProblemThis section shows how to set up the problem before applying the functionlsqlin, which solves linear least squares problems of the following form:1-4

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

Saved successfully!

Ooh no, something went wrong!