funCustom05

PURPOSE ^

% Custom function 5

SYNOPSIS ^

function [p,dp]=funCustom05(xx)

DESCRIPTION ^

% Custom function 5
L. LAURENT -- 14/12/2017 -- luc.laurent@lecnam.net

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Custom function 5
0002 %L. LAURENT -- 14/12/2017 -- luc.laurent@lecnam.net
0003 
0004 % sources available here:
0005 % https://bitbucket.org/luclaurent/optigtest/
0006 % https://github.com/luclaurent/optigtest/
0007 
0008 % optiGTest - set of testing functions    A toolbox to easy manipulate functions.
0009 % Copyright (C) 2017  Luc LAURENT <luc.laurent@lecnam.net>
0010 %
0011 % This program is free software: you can redistribute it and/or modify
0012 % it under the terms of the GNU General Public License as published by
0013 % the Free Software Foundation, either version 3 of the License, or
0014 % (at your option) any later version.
0015 %
0016 % This program is distributed in the hope that it will be useful,
0017 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0018 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0019 % GNU General Public License for more details.
0020 %
0021 % You should have received a copy of the GNU General Public License
0022 % along with this program.  If not, see <http://www.gnu.org/licenses/>.
0023 
0024 %
0025 %global minimum : f(x)=-1.12848 for x= -0.636071
0026 %local minima
0027 % f          | x
0028 % -0.87707   | 0.620064
0029 % -0.640515  | 1.87613
0030 % -0.417063  | 3.13212
0031 % -0.205166  | 4.38803
0032 % -0.00346222| 5.64383
0033 % 0.189252   | 6.89953
0034 % 0.374037   | 8.1551
0035 % 0.551826   | 9.41053
0036 % 0.723445   | 10.6658
0037 % 0.88962    | 11.9209
0038 % 1.05099    | 13.1757
0039 % 1.20812    | 14.4304
0040 %
0041 %
0042 %
0043 %Design space: -1<xi<15
0044 %
0045 
0046 
0047 function [p,dp]=funCustom05(xx)
0048 %constants
0049 a=10;
0050 b=0;
0051 c=5;
0052 
0053 %evaluation and derivatives
0054 %
0055 p=exp(-xx/a).*cos(c*xx)+1/a*xx+b;
0056 
0057 %
0058 if nargout==2
0059     %
0060     dp=-exp(-xx/a).*(c*sin(c*xx)+1/a.*cos(c*xx))+1/a;
0061 end
0062 %
0063 end

Generated on Tue 28-May-2019 16:00:34 by m2html © 2005