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

📄 subsasgn.m

📁 Passino所提出的细菌优化算法matlab源程序
💻 M
字号:
function p = subsasgn(p,index,val)
% SUBSASGN Define index assignment for agent objects
switch index.type
case '()'
    switch index.subs{:}
    case 1
        p.ID = val;
    case 2
        p.angle = val;
    otherwise
        error('Index out of range')
    end
case '.'
    switch index.subs
    case 'ID'
        p.ID = val;
    case 'angle'
        p.angle = val;
    otherwise
        error('Invalid field name')
    end
end

⌨️ 快捷键说明

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