ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
getFunc.m
Go to the documentation of this file.
1
%> \brief
2
%> Return the value of the 2-dimensional Himmelblau
3
%> function at the specified input value.
4
%>
5
%> \details
6
%> Himmelblau
's function is a multi-modal function, used to test
7
%> the performance of optimization algorithms. The function is defined by:
8
%> \f{equation}
9
%> H(x, y) = (x^{2} + y - 11)^{2} + (x + y^{2} - 7)^{2} ~.
10
%> \f}
11
%>
12
%> It has one local maximum at \f$x = -0.270845\f$ and \f$y = -0.923039\f$ where \f$H(x, y) = 181.617\f$,
13
%> and four identical local minima:
14
%> \f{eqnarray}
15
%> H(3.0,2.0) &=& 0.0 ~,\\
16
%> H(-2.805118, 3.131312) &=& 0.0 ~,\\
17
%> H(-3.779310, -3.283186) &=& 0.0 ~,\\
18
%> H(3.584428, -1.848126) &=& 0.0 ~.
19
%> \f}
20
%>
21
%> The function is named after David Mautner Himmelblau (1924–2011), who introduced it.<br>
22
%> The locations of all the minima can be found analytically.<br>
23
%>
24
%> \param[in] x : The input scalar or array of the same rank and shape as
25
%> other input array-like arguments of type MATLAB ``double``,
26
%> representing the x-component of the state within the domain
27
%> of Himmelblau function at which the function value must be computed.
28
%> \param[in] y : The input scalar or array of the same rank and shape as
29
%> other input array-like arguments of type MATLAB ``double``,
30
%> representing the y-component of the state within the domain
31
%> of Himmelblau function at which the function value must be computed.
32
%>
33
%> \return
34
%> ``func`` : The output scalar or array of the same rank and shape
35
%> as the input array-like arguments representing the value
36
%> of the Himmelblau function at the specified input ``x`` and ``y``.
37
%>
38
%> \interface{getFunc}
39
%> \code{.m}
40
%>
41
%> func = pm.stats.himmelblau.getFunc(x, y);
42
%>
43
%> \endcode
44
%>
45
%> \see
46
%> [pm.stats.himmelblau.getFunc](@ref getFunc)<br>
47
%> [pm.stats.himmelblau.getLogUDF](@ref getLogUDF)<br>
48
%> [pm.sampling.Paradram](@ref Paradram)<br>
49
%>
50
%> \example{getFunc}
51
%> \include{lineno} example/math/func/himmelblau/getFunc/main.m
52
%> \vis{getFunc}
53
%> \image html example/math/func/himmelblau/getFunc/himmelblau.getFunc.2d.png width=700
54
%> \image html example/math/func/himmelblau/getFunc/himmelblau.getFunc.3d.png width=700
55
%>
56
%> \final{getFunc}
57
%>
58
%> \author
59
%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
60
function func = getFunc(x, y)
61
func = (x.^2 + y - 11).^2 + (x + y.^2 - 7).^2;
62
end
getFunc
function getFunc(in x, in y)
Return the value of the 2-dimensional Himmelblau function at the specified input value.
src
matlab
main
+pm
+math
+func
+himmelblau
getFunc.m
Generated on Mon Dec 2 2024 10:04:17 for ParaMonte MATLAB 3.0.0 by
1.9.3