请教高人为什么提示sol未定义?。

function [sol, val]=gabpEval(sol,options)
load data2
nntwarn off
XX=premnmx(XX);
YY=premnmx(YY);
P=XX;
T=YY;
R=size(P,1);
S2=size(T,1);
S1=25;%隐含层节点数
S=R*S1+S1*S2+S1+S2;%遗传算法编码长度
for i=1:S,
x(i)=sol(i);
end;
[W1, B1, W2, B2, P, T, A1, A2, SE, val]=gadecod(x);
[ 本帖最后由 strongbox 于 2008-5-24 12:22 编辑 ]

 Accepted Answer

gepafa
gepafa on 21 Nov 2022

0 votes

gabpEval(sol,options)其中一个输入sol你没有定义,也就是说你没有告诉MATLAB这个sol是什么,人家算不了。

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Asked:

on 21 Nov 2022

Answered:

on 21 Nov 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!