Could you plz help me guys.

I am working on something like this subject and every-time I operate this code, it gives me "Undefined function or variable 'x_ga_opt'". So if anyone has the code, could you plz email it to me.

Antworten (2)

James Tursa
James Tursa am 20 Jun. 2014

1 Stimme

Can you examine the code to see if it looks like a function or a variable? Maybe it is a variable that was supposed to be defined upstream in the code but didn't for some reason. Or maybe there is a script m-file out there that is supposed to define this variable. Etc etc. You really haven't given us much to go on. Can you search all of the m-files for the string 'x_ga_opt'?
Hussam musbah
Hussam musbah am 20 Jun. 2014

0 Stimmen

Thanks a lot for your response! These are the results???? Undefined function 'mse_test' for input arguments of type 'network'.
Error in @(x)mse_test(x,net,inputs,targets)
Error in validate>@(x)fitness(x,FitnessFcnArgs{:}) (line 136) fitness = @(x) fitness(x,FitnessFcnArgs{:});
Error in fcnvectorizer (line 14) y(i,:) = feval(fun,(pop(i,:)));
Error in makeState (line 47) Score = fcnvectorizer(state.Population(initScoreProvided+1:end,:),FitnessFcn,1,options.SerialUserFcn);
Error in gaunc (line 41) state = makeState(GenomeLength,FitnessFcn,Iterate,output.problemtype,options);
Error in ga (line 351) [x,fval,exitFlag,output,population,scores] = gaunc(FitnessFcn,nvars, ...
Error in Untitled2 (line 29) [x_ga_opt, err_ga] = ga(h, 3*n+1, ga_opts); Caused by: Failure in user-supplied fitness function evaluation. GA cannot continue.
Error using edit (line 66) Undefined function or variable 'x'.

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 20 Jun. 2014

Beantwortet:

am 20 Jun. 2014

Community Treasure Hunt

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

Start Hunting!

Translated by