小编lar*_*lxz的帖子

MATLAB奇怪'输入参数太多'错误

对于一个项目,我正在尝试使用matlab在另一个.m文件中调用一个函数.然而,它说"没有足够的输入参数",即使我确实传递了我相当确定的足够的输入参数.

在eval_square.m中:

function f = eval_square(x)

%   fitness function of the magic square
%
%   Parameters
%   ----------
%       x : array, the solution vector that represents a magic square.
%           By default, the solution vector is converted to a magic square
%           columnwisely.
%   Output
%   ----------
%       f : double, the error value of the input solution vector.
%           the mean squared error (MSE) of all each row, column and
%           diagonal sum to the magic constant is …
Run Code Online (Sandbox Code Playgroud)

matlab

2
推荐指数
1
解决办法
269
查看次数

标签 统计

matlab ×1