Exporting "optimresults" after running linprog

Does anyone know the code for exporting optimresults structure after running linprog. I have the rest of the code to work with that structure, just want to automate it a little.
Thank You

回答 (1 件)

Alan Weiss
Alan Weiss 2015 年 4 月 8 日

0 投票

In your output function, check the value of the state of the algorithm. When it is 'done' you can save the optimValues structure to the workspace using the assignin command:
assignin('base','optimValues',optimValues);
I didn't try this, but I believe that it should work.
Alan Weiss
MATLAB mathematical toolbox documentation

2 件のコメント

Bob Sieger
Bob Sieger 2015 年 4 月 8 日
Tried it in different variations. didn't seem to work unless I don't know how to work it.
Alan Weiss
Alan Weiss 2015 年 4 月 9 日
Please show us your output function code, and the result (if any) in the workspace.
Alan Weiss
MATLAB mathematical toolbox documentation

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

カテゴリ

ヘルプ センター および File ExchangeLinear Programming and Mixed-Integer Linear Programming についてさらに検索

タグ

質問済み:

2015 年 4 月 8 日

コメント済み:

2015 年 4 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by