Reputation: 343
I have the following very simple code.
>> z=ones(4,4)
z =
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
>> size(z)
Index exceeds matrix dimensions.
Does anyone know why? Any comment is greatly appreciated.
Upvotes: 0
Views: 46
Reputation: 112679
A likely cause is: You have a variable called size
, and that variable is empty. Try clear size
and then size(z)
.
Upvotes: 1