Navigation

Operators and Keywords

Function List:

C++ API

logical.m File Reference


Functions

 elseif (isempty(x)) y
endif else error ("logical not defined for type `%s'", typeinfo(x))
endif else print_usage ()
endif endfunction !assert (logical([]), zeros([0, 0],"logical"))
 !assert (logical(zeros(2, 0)), zeros([2, 0],"logical"))
 !assert (logical(0), false)
 !assert (logical(13), true)
 !assert (logical(-13), true)
 !assert (logical(int8(13)), true)
 !assert (logical(int8(-13)), true)
 !assert (logical([-1, 0, 1, Inf]),[-1, 0, 1, Inf]!=0)

Variables

function y

Function Documentation

!assert ( logical([-1, 0, 1, Inf])  ,
[-1, 0, 1, Inf] !  = 0 
)

!assert ( logical(int8(-13))  ,
true   
)

!assert ( logical(int8(13))  ,
true   
)

!assert ( logical(-13)  ,
true   
)

!assert ( logical(13)  ,
true   
)

!assert ( logical(0)  ,
false   
)

!assert ( logical(zeros(2, 0))  ,
zeros([2, 0],"logical")   
)

endif endfunction !assert ( logical([])  ,
zeros([0, 0],"logical")   
)

elseif ( isempty(x)   ) 

endif else error ( "logical not defined for type `%s'"  ,
typeinfo(x)   
)

endif else print_usage (  ) 


Variable Documentation

elseif (isnumeric (x)) if (any (isnan (x( else y

Initial value:

 logical (x)

  if (nargin == 1)
    if (islogical (x))
      y = x