MATLAB dimensions of logical array

I have a problem in MATLAB. I have a NxM logical array called L but if I do dim(L) I get:

Undefined function or method 'dim' for input arguments of type 'logical'

size doesn't work either. length works but gives me only the number of columns and not the rows. The weird thing is that in the Matlab workspace it is correctly shown as an NxM logical array.

Does anyone know how I can get the amount of rows and columns of a logical array?

Thanks in advance.

Answers


If you want both the number of rows and colums, size is your best choice:

[nRows,nCols] = size(L)

If this fails, use clear size first, since you may accidentially have a variable of the same name in your workspace.


Need Your Help

Infragistics no licence information found

vb.net visual-studio-2008 infragistics

I try to load my project after I formatted my pc from win7 32bit to win8 64bit(might has something to do with the error) and the Infragistics licenses don't work. I have 8 Infragistics entries in my

How do you determine when a button is clicked in the child on the parent - ASP.NET

c# asp.net gridview updatepanel parent-child

In my child user control I have a gridview with an OnRowCommand eventhandler that is executed when Edit button is click. I want to set the visibility of an ASP.NET placeholder control in the paren...