| Genetic Algorithm and Direct Search Toolbox | ![]() |
Writing an M-File for the Function You Want to Optimize
To use the Genetic Algorithm and Direct Search Toolbox, you must first write an M-file that computes the function you want to optimize. The M-file should accept a row vector, whose length is the number of independent variables for the objective function, and return a scalar. This section explains how to write the M-file and covers the following topics:
| Related Products | Example -- Writing an M-File | ![]() |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |