フィルターのクリア

Undefined function 'ga' for input arguments of type 'function_handle'.

2 ビュー (過去 30 日間)
Shashank
Shashank 2014 年 11 月 20 日
編集済み: Alan Weiss 2014 年 11 月 20 日
Hi,
I have 2014a version of matlab on my mac. I am trying to solve a MILP using ga. The global optimization toolbox is installed on my system, and I also have the license for it. But when I try to run the ga, I get the following error:
Undefined function 'ga' for input arguments of type 'function_handle'.
A snippet from my code:
fn = @(x) f'*x;
[x,fval,exitflag]=ga(fn,2*n^2,A,b,Aeq,beq,lb,ub,[],intcon);
I don't know how to debug it, since documentations says that I need to supply a function handle here.

回答 (1 件)

Alan Weiss
Alan Weiss 2014 年 11 月 20 日
編集済み: Alan Weiss 2014 年 11 月 20 日
Try entering
which -all ga
Perhaps there is another ga file that is getting precedence.
Even better, use intlinprog rather than ga for much better performance and reliability.
Alan Weiss
MATLAB mathematical toolbox documentation

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by