Beginners Guide to Excel Link?

1 次查看(过去 30 天)
Jeremy
Jeremy 2012-2-28
Looking for a good source to get started using Excellink. I currently have a "simulation" that runs in Excel VBA (at the time it was the only numerical solver I had access to). Part of the simulation requires running a binary integer programming problem. Excel Solver can take literally hours to do this for large data sets. Rather than reqriting the whole thing, I'd like to simply modify my existing code to call bintprog() and get the resulting vector back. I've never used Excel Link and was wondering if anyone could recommend a good beginner's guide, preferably with some examples similar my situation...i.e. having the VBA call a Matlab function and get the result back for further VBA processing. Thanks!

回答(1 个)

Jiro Doke
Jiro Doke 2012-2-28
Have you gone through the documentation for Excel Link (or Spreadsheet Link EX)? It has several examples, including writing VBA code to call MATLAB.
  1 个评论
Jeremy
Jeremy 2012-2-28
I found a couple of examples in the documentation of fairly basic operations. What I gather is that you mainly use
MLEvalString("<whatever you would type in MATLAB>")
So in my case, MLEvalString("x=bintprog(f,A,b)") assuming I had used MLPutVar to populate f, A, and B. It's not made explicitly clear, but I assume the VBA execution pauses until the MatLab execution completes? For large sizes, bintprog can still take 15-20 seconds to execute.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Data Export to MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by