Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Unable to troubleshoot error message

Asked by jasen on 7 May 2013

Aa = [0 1 0 ; 0 0 1 ; 0 -2025 -90]

Aa =

           0           1           0
           0           0           1
           0       -2025         -90

>> sz=size(Aa) Error using InputOutputModel/subsref (line 44) Subscript no. 2 is out of range.

2 Comments

John Doe on 7 May 2013

Does size work for any other variables, or does it fail for all?

jasen on 7 May 2013

It fails for all. Does another library need to be invoked to use that function ?

jasen

Products

No products are associated with this question.

1 Answer

Answer by Image Analyst on 8 May 2013

This code:

Aa = [0 1 0 ; 0 0 1 ; 0 -2025 -90]
sz=size(Aa) 

works fine for me. No error message whatsoever. What are you not telling us? What information have you left out? LIke, did you redefine size? What does this say

which -all size

Does it look like

built-in (C:\Program Files\MATLAB\R2013a\toolbox\matlab\elmat\size)
size is a built-in method                                                      % containers.Map method
size is a Java method                                                          % java.util.ArrayList method
size is a Java method                                                          % java.util.AbstractList method
size is a Java method                                                          % java.util.AbstractCollection method
size is a Java method                                                          % java.util.Collection method
size is a Java method                                                          % java.util.List method

and so on? Or does it have some function listed that you wrote and is living in one of your folders?

0 Comments

Image Analyst

Contact us