Using MATLAB Optimization toolbox functions in Excel

3 ビュー (過去 30 日間)
Tolutola
Tolutola 2013 年 4 月 12 日
Hi, I'm trying to get matlab optimization functions (like fmincon) to work in an excel sheet just like the excel solver. The challenge is these functions require functions as one of their input arguments so i need them to see a cell range as a function not just an variable. I've tried Spreadsheet link EX and MATLAB Builder Ex but I don't seem to be making a headway.
I'll appreciate any useful suggestions.
Thanks

回答 (1 件)

Matt J
Matt J 2013 年 4 月 12 日
編集済み: Matt J 2013 年 4 月 12 日
Well, you could call xlsread and xlswrite inside your objective function to access the spreadsheet, but that seems rather inefficient. It's unclear why you wouldn't just read your Excel data into MATLAB and work from there.
  2 件のコメント
Tolutola
Tolutola 2013 年 4 月 12 日
Thanks. I don't have the static data. The data is generated real time from a process simulator and fed to excel. I have used the excel solver to perform the optimization(changing variables real time and simulating the model to get the value of the obj fun) but it would be great to have access to matlab more robust and efficient optimization functions. xlsread and xlswrite would be very slow.
Matt J
Matt J 2013 年 4 月 12 日
Since your simulator writes data to Excel via a process similar to xlswrite, it's hard to imagine you'd increase your data communication time by an order of magnitude by calling xlsread/write once per data set. Also, since FMINCON is iterative, I'd expect it could be your computational bottleneck anyway.

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

カテゴリ

Help Center および File ExchangeData Export to MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by