too many input arguments.matlabfunction [X,FVAL,REASON,OUTPUT,POPULATION,SCORES] = zuiyou%% This is an auto generated M file to do optimization with the Genetic Algorithm and% Direct Search Toolbox.Use GAOPTIMSET for default GA options structure.int

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/18 02:51:46

too many input arguments.matlabfunction [X,FVAL,REASON,OUTPUT,POPULATION,SCORES] = zuiyou%% This is an auto generated M file to do optimization with the Genetic Algorithm and% Direct Search Toolbox.Use GAOPTIMSET for default GA options structure.int
too many input arguments.matlab
function [X,FVAL,REASON,OUTPUT,POPULATION,SCORES] = zuiyou
%% This is an auto generated M file to do optimization with the Genetic Algorithm and
% Direct Search Toolbox.Use GAOPTIMSET for default GA options structure.
int c(8,8)={{0,12,14,10,20,25,27,18 },{12,0,5,13,6,14,41,39},{14,5,0,16,18,20,30,32},{10,13,16,0,14,27,15,12},{20,6,18,14,0,22,18,26},{25,14,20,27,22,0,27,32},{27,41,30,15,18,27,0,15},{18,39,32,12,26,32,15,0}}
int X(8,8);
int popsize;
int chromlength;
% #include
% #include
%
% {
% int i,j;
% srand((int)time(0));
%
% for(i=0;i
运行提示:too many input arguments

too many input arguments.matlabfunction [X,FVAL,REASON,OUTPUT,POPULATION,SCORES] = zuiyou%% This is an auto generated M file to do optimization with the Genetic Algorithm and% Direct Search Toolbox.Use GAOPTIMSET for default GA options structure.int
你调用某个函数的时候,给的变量比较多,举个例子
function a=fun(b)
这个函数只能接受一个变量b,如果你这样用fun(1,2)肯定就会报错了.

突然份额发