'optimvar' が未定義です。のエラー

12 Ansichten (letzte 30 Tage)
Toshiaki Ito
Toshiaki Ito am 9 Nov. 2017
Bearbeitet: Toshiaki Ito am 10 Nov. 2017
https://jp.mathworks.com/help/optim/ug/factory-warehouse-sales-allocation-model.html にある右上のボタン Try this Example から Try it in your Browser を選びそのプログラムの内容をそのままmファイルに書き込んで実行すると,
x=optimvar('x',P,F,W,'LowerBound',0);
の行で, 「関数または変数 'optimvar' が未定義です。」のエラーが出るがどうしてでしょうか? OptimaizationToolBoxがちゃんとアドオンで入っているのですが...

Akzeptierte Antwort

Toshiaki Ito
Toshiaki Ito am 10 Nov. 2017
Bearbeitet: Toshiaki Ito am 10 Nov. 2017
迅速なご返答ありがとうございます.確かに当方のMatlabのバージョンは2R017aでした. 早速bバージョンをインストールしなおして実行可能か確認してみましたが,確かに動きました. ありがとうございました.

Weitere Antworten (1)

Kojiro Saito
Kojiro Saito am 9 Nov. 2017
ドキュメントのリンクですが、こちらのExamplesのほうではないでしょうか。 https://jp.mathworks.com/help/optim/examples/factory-warehouse-sales-allocation-model.html?lang=en
こちらに出てくる関数optimvarは、R2017bのリリースで導入された関数のため、R2017a以前のMATLABでは上記のようなエラーが出ます。お使いのMATLABのバージョンがR2017bになっているか、今一度ご確認いただけますでしょうか。

Kategorien

Mehr zu 変数のスコープ指定と名前の生成 finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!