对于一个项目,我正在尝试使用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 ×1