请教高人为什么提示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 编辑 ]

 채택된 답변

gepafa
gepafa 2022년 11월 21일

0 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

2022년 11월 21일

답변:

2022년 11월 21일

Community Treasure Hunt

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

Start Hunting!