Why do I experience errors of the form "subscript out of range" when interfacing with MATLAB 7.0 (R14) via COM/ActiveX or Excel Link 2.2 (R14) and higher?

1 次查看(过去 30 天)
I am connecting to MATLAB 7.0 (R14) using either Visual Basic and the MATLAB COM interface or Excel Link. When I attempt to put data into MATLAB using either PutFullMatrix, PutWorkspaceData, or MLPutMatrix I receive an error such as:
subscript out of range
This was not a problem with MATLAB 6.5.1 (R13SP1).

采纳的回答

MathWorks Support Team
This problem may arise when you attempt to put a zero-based Visual Basic array into MATLAB. MATLAB uses one-based arrays. Visual Basic allows you to create both zero and one-based arrays. With MATLAB 7.0 (R14), the use of one-based arrays is enforced.

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by