Failure in user-supplied fitness function evaluation

 Accepted Answer

Is penalty2 a function on your MATLAB path? Find out by issuing the command
which -all penalty2
Alan Weiss
MATLAB mathematical toolbox documentation

2 Comments

I hope that you realize that this is the answer to your question. MATLAB is not finding your fitness function. Put it on your path, or change directories to wherever it is.
Alan Weiss
MATLAB mathematical toolbox documentation
Please copy the entire MATLAB output and show us. And perhaps show us how you called ga (I mean something like x = ga(@penalty2,4,...))
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

More Answers (0)

Categories

Tags

No tags entered yet.

Asked:

on 5 Aug 2014

Edited:

on 13 Aug 2014

Community Treasure Hunt

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

Start Hunting!