⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arstest.m

📁 youhua hfghdfgfh fghgf hgf
💻 M
字号:
function ARStest

    SAOptions = get_ARSOptions;
    ARSOptions.Obj.f2eval='obj_fun';
    ARSOptions.Vars.Dim=2;
    ARSOptions.Obj.lb=[95;8995];
    ARSOptions.Obj.ub=[105;9005]; 
    ARSOptions.ARSpara.flags=0;
    ARSOptions.Vars.initialvalue=[99;9002];
    ARSOptions.Vars.Iterations=30;
    ARSOptions.Vars.limit=1e-10;
    ARSOptions.ARSpara.radius=5;
    ARSOptions.ARSpara.factor_contract=sqrt(2);
    ARSOptions.ARSpara.Nrestart_max=4;
    [x_min,f_xmin] = ARS(ARSOptions)
    
    
    %plot the function figure
    a=95:0.1:105;
    b=8995:0.1:9005;
    [X,Y]=meshgrid(a,b);
    m=size(a,2);
    for i=1:m
        for j=1:m
            Z(i,j)=20+(X(i,j)-100)^2+(Y(i,j)-9000)^2-10*(cos(2*pi*(X(i,j)-100))+cos(2*pi*(Y(i,j)-9000)));
        end
    end
    meshc(X,Y,Z)
    title('A function figure')
    xlabel('x axis')
    ylabel('y axis')
    zlabel('function values')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -