MLGetMatrix does not return something into xls although flag says "command sucessful"

2 ビュー (過去 30 日間)
Lea
Lea 2012 年 6 月 19 日
I am trying to use MLGetMatrix from the Spreadsheet Link EX toolbox. I can see the out variable in the workspace but it does not return somehing into xls although the test flag is set to 0 indicating that the command succeeded:
Sub testmlxls()
MLEvalString "clear all"
MLShowMatlabErrors "yes"
MLPutMatrix "in", Range("B1")
MLPutMatrix "in2", Range("B2")
MLEvalString ("out = in + in2")
test = MLGetMatrix("out", "test!B3") Cells(3, 2).Address
End Sub
Anyone can help? Thanks

回答 (1 件)

Lea
Lea 2012 年 6 月 20 日
If MLGetMatrix is used in a subroutine you have to add MatlabRequest after the MlGetMatrix call.

カテゴリ

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