MATlab fminunc error too many input arguments

1 回表示 (過去 30 日間)
Barry Ellis
Barry Ellis 2019 年 10 月 15 日
編集済み: Matt J 2019 年 10 月 15 日
I run the code from the simple example in the Optimazation Toolbox user's guide:
>>anonrosen = @(x) (100*(x(2) - x(1)^2)^2 + (1-x(1))^2);
>>options = optimoptions(@fminunc,'Algorithm','quasi-newton');
>>[x fval] = fminunc(anonrosen,[-1;2],options)
I get:
Error using fminunc
Too many input arguments.
I have R2019a with Optimazation toolbox Version 8.3
  1 件のコメント
Matt J
Matt J 2019 年 10 月 15 日
編集済み: Matt J 2019 年 10 月 15 日
Kindly show us the output of,
>> which -all fminunc
and also,
>> which fminunc(anonrosen,[-1;2],options)

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

回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by