Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Question regarding the Spredsheet link EX tool, MLGetMatrix function

1 回表示 (過去 30 日間)
John
John 2013 年 2 月 23 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hello,
I have a question regarding the Spreadsheet Link EX tool.
I have been trying to use the code below in a loop in a VBA macro to pass 3 cells in excel as inputs into a fuzzy logic model in Matlab. I can see in Matlab the output being correctly computed in the workspace but the value is not printed into the cell in excel.
I know for sure that MLGetMatrix line is wrong. It works fine if I used a fixed cell such as MLGetMatrix "decision", sh1.Range("AJ5").Address but not if I use the current line below.
Could anybody tell me what I am doing something wrong with the MLGetMatrix function?
Thank you
Kind Regards
MLShowMatlabErrors "yes"
MLEvalString ("cd('T:\1-L1UYWP')")
MLPutMatrix "decision_inputs", sh1.Range(sh1.Cells(ii, k + 7), sh1.Cells(ii, k + 9))
MLEvalString ("decision =evalfis(decision_inputs,Model)")
MLEvalString ("decision =round(decision)")
MLGetMatrix "decision", sh1.Range(sh1.Cells(ii, k + 10)).Address '*** Output is not printed into cell***
MatlabRequest

回答 (1 件)

John
John 2013 年 2 月 25 日
bump

Community Treasure Hunt

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

Start Hunting!

Translated by