% Custom function 6 L. LAURENT -- 27/05/2019 -- luc.laurent@lecnam.net
0001 %% Custom function 6 0002 % L. LAURENT -- 27/05/2019 -- 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)=20.6508 for x= 9.6952 0026 %local minima 0027 % f | x 0028 % 0.6204 | 73.3129 0029 % 2.8362 | 92.2315 0030 % 7.4016 | 321.3776 0031 % 0032 % 0033 % 0034 %Design space: -1<xi<15 0035 % 0036 0037 0038 function [p,dp]=funCustom07(xx) 0039 %constants 0040 a10=0.002201370; 0041 a9=-0.1052876; 0042 a8=2.151650; 0043 a7=-24.60697; 0044 a6=173.4160; 0045 a5=-782.1379; 0046 a4=2267.874; 0047 a3=-4114.980; 0048 a2=4357.030; 0049 a1=-2327.900; 0050 b=550; 0051 0052 %evaluation and derivatives 0053 % 0054 p = a10*xx.^10 + a9*xx.^9 + a8*xx.^8 ... 0055 + a7*xx.^7 + a6*xx.^6 + a5*xx.^5 ... 0056 + a4*xx.^4 + a3*xx.^3 + a2*xx.^2 ... 0057 + a1*xx + b ; 0058 0059 % 0060 if nargout==2 0061 % 0062 dp=10*a10*xx.^9 + 9*a9*xx.^8 + 8*a8*xx.^7 ... 0063 + 7*a7*xx.^6 + 6*a6*xx.^5 + 5*a5*xx.^4 ... 0064 + 4*a4*xx.^3 + 3*a3*xx.^2 + 2*a2*xx ... 0065 + a1 ; 0066 end 0067 % 0068 end