Shubert 函数:定义、表达式及 MATLAB 实现
Shubert 函数是一个多峰函数,其定义域为 [-10, 10] 的二维空间中。它的表达式为:/n/n$$f(x,y)=/prod_{i=1}^{5}/sum_{j=1}^{10}j/cdot/cos((j+1)x+j)$$/n/n其中,i 表示第 i 个峰值,j 表示第 j 个波峰。/n/n在 MATLAB 中,Shubert 函数的表达式可以写为:/n/nmatlab/nfunction f = shubert(x,y)/n f = 1;/n for i = 1:5/n sum1 = 0;/n for j = 1:10/n term1 = j*cos((j+1)*x+i);/n term2 = j*cos((j+1)*y+i);/n sum1 = sum1 + term1 + term2;/n end/n f = f * sum1;/n end/nend/n/n/n其中,x 和 y 分别表示变量的取值,f 表示 Shubert 函数的值。
原文地址: https://www.cveoy.top/t/topic/nq0h 著作权归作者所有。请勿转载和采集!