attached_part.m

来自「其中提到遺傳學的程式碼與應用提供給次淚相向的研究者參考下載」· M 代码 · 共 22 行

M
22 行
字号
% attached_part.m
% This is a partial program codes appended to the end
% of each OBJECTIVE function file.
% IN : PI
% OUT: PI
% It converts a MIN-finding problem to a MAX-finding one.
% Set MIN_offset>0 for a MIN problem.

% PI must be existed before executing this program.
if ~exist('PI')
    error('***ERROR! PI must be defined first');
else
% If it is a minimization problem, then
    if (~isempty(MIN_offset) & MIN_offset>0)
        PI=MIN_offset-PI;
    end
% Scaling
    if ~isempty(MUL_factor)
        PI=PI*MUL_factor;
    end
end

⌨️ 快捷键说明

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