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?
2 views (last 30 days)
Show older comments
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).
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
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 Comments
More Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!