Linprog Error MATLAB R2017B

2 ビュー (過去 30 日間)
SYT
SYT 2018 年 6 月 6 日
編集済み: SYT 2018 年 6 月 7 日
Hi, I've been encountering the following linprog error from my laptop:
"Attempt to execute SCRIPT linprog as a function:
Error"
Even when I used the codes from the link attached, I still get the same error code. https://www.mathworks.com/help/optim/ug/linprog.html

採用された回答

Stephan
Stephan 2018 年 6 月 7 日
Hi,
see this:
i guees on your new machine there is a script named linprog.m
to check use:
which linprog -all
There should only be one result, namely in the Matlab directory of the optimization toolbox:
>> which linprog
C:\Program Files\MATLAB\R2018a\toolbox\optim\optim\linprog.m
This is an example on my machine. If you have more than one results rename or delete the script(s) which are not in the optimization toolbox:
>> which linprog -all
C:\Users\stephan\Documents\MATLAB\projects\linprog.m
C:\Program Files\MATLAB\R2018a\toolbox\optim\optim\linprog.m % Shadowed
This example will cause problems.
Best regards
Stephan

その他の回答 (1 件)

Kojiro Saito
Kojiro Saito 2018 年 6 月 7 日
This answer might be helpful.
There would be filename conflict in your custom script and built-in linprog. Could you confirm whether you have created linprog.m in your MATLAB paths.
which -all linprog
If you find linprog.m in a folder which is not MATLAB installation folder, please rename the file to avoid file name conflict.

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

タグ

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by