フィルターのクリア

error ga optimization: M must be in the range 0 <= M <= 1.

1 回表示 (過去 30 日間)
Björn
Björn 2012 年 11 月 20 日
When trying to optimize a function with the ga-function in the 'Optimization Tool' I get the error: M must be in the range 0 <= M <= 1. What does this error exactly mean? Is it that the solution of my functions have to be in that range?
  1 件のコメント
Björn
Björn 2012 年 11 月 20 日
The problem was with a function within my function to optimize. Nothing to do with ga-function

サインインしてコメントする。

回答 (1 件)

Sean de Wolski
Sean de Wolski 2012 年 11 月 20 日
The more information you can give us the better. How are you calling ga()? What does your function look like? A Screenshot of optimtool etc...
I'll take a blind stab at it though: I'll bet you've specified your MigrationFraction to be outside of the range of 0-1.
This is explained in the doc for gaoptimset
doc gaoptimset
  3 件のコメント
Matt J
Matt J 2012 年 11 月 20 日
Then the error messages that MATLAB prints should tell you which function it is and at what line it occurs. So you should have a pretty good idea what to fix.
Sean de Wolski
Sean de Wolski 2012 年 11 月 20 日
編集済み: Sean de Wolski 2012 年 11 月 20 日
@Bjorn, please write this as an answer and accept it to mark this question closed.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeProblem-Based Optimization Setup についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by