Graphics Programs Reference
In-Depth Information
and the geometricconstraints are
L
1
cos
θ
1
+
L
2
cos
θ
2
+
L
3
cos
θ
3
=
B
L
1
sin
θ
1
+
L
2
sin
θ
2
+
L
3
sin
θ
3
=
H
The principle of minimum potentialenergy states that the equilibrium config-
uration of the systemis the onethatsatisfies geometricconstraints and mini-
mizes the potentialenergy. Determine the equilibrium values of
θ
1
,
θ
2
and
θ
3
given that
L
1
=
1
.
2m,
L
2
=
1
.
5m,
L
3
=
1
.
0 m,
B
=
3
.
5m,
H
=
0,
W
1
=
20kNand
W
2
=
30kN.
MATLAB Functions
x = fmnbnd(@func,a,b)
returns
x
that minimizes the function
func
of a single
variable. The minimumpoint must be bracketedin
(a,b)
. The algorithmused
is
Brent's method
thatcombines golden section search with quadratic interpo-
lation. It is moreefficientthan
goldSearch
that uses just the golden section
search.
x = fminsearch(@func,xStart)
returns the vector of independent variables that
minimizes the multivariate function
func
. The vector
xStart
contains the
starting values of
x
. The algorithmis the
Nelder-Mead method
, also known
as the
downhill simplex
, which is reliable, but much less efficientthan Powell's
method.
Both of these functionscan becalledwith variouscontrol optionsthat set op-
timization parameters(e.g., the error tolerance) and control the display of results.
There are also additionaloutput parametersthat may be usedinthe function call, as
illustratedinthe following example (the dataistaken from Example 10.4):
>> [x,fmin,output] = fminsearch(@fex10
_
4,[1 5])
x=
0.7331
7.5878
fmin =
18.6929
output =
iterations: 38
funcCount: 72
algorithm: 'Nelder-Mead simplex direct search'
Search WWH ::
Custom Search