佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1358|回复: 4

Matlab Coding Help !

[复制链接]
发表于 30-11-2010 04:13 PM | 显示全部楼层 |阅读模式
What is


function f = initialize_variables(N,problem)





Thank you.
回复

使用道具 举报


ADVERTISEMENT

发表于 30-11-2010 04:46 PM | 显示全部楼层
回复 1# yeongchuan88


    function f = initialize_variables(N,problem)% function f = initialize_variables(N,problem)
% N - Population size
% problem - takes integer values 1 and 2 where,
%           '1' for MOP1
%           '2' for MOP2
%
% This function initializes the population with N individuals and each
% individual having M decision variables based on the selected problem.
% M = 6 for problem MOP1 and M = 12 for problem MOP2. The objective space
% for MOP1 is 2 dimensional while for MOP2 is 3 dimensional.

% Both the MOP's has 0 to 1 as its range for all the decision variables.
min = 0;
max = 1;
switch problem
    case 1
        M = 6;
        K = 8;
    case 2
        M = 12;
        K = 15;
end
for i = 1 : N
    % Initialize the decision variables
    for j = 1 : M
        f(i,j) = rand(1); % i.e f(i,j) = min + (max - min)*rand(1);
    end
    % Evaluate the objective function
    f(i,M + 1: K) = evaluate_objective(f(i,,problem);
end


中文~
回复

使用道具 举报

发表于 30-11-2010 04:47 PM | 显示全部楼层
Type "help initialize_variables" in matlab command prompt to know about that function.

中文~
回复

使用道具 举报

 楼主| 发表于 30-11-2010 04:54 PM | 显示全部楼层
How to use Matlab command prompt ?
回复

使用道具 举报

发表于 30-11-2010 09:40 PM | 显示全部楼层
借書來看....
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 17-11-2025 12:44 AM , Processed in 0.141389 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表