How to determine whether a matrix is empty or not in matlab?

前端 未结 1 900
情深已故
情深已故 2021-01-04 17:39

In my matlab program, I want to determine whether a variable or output of a function is empty or not, before going further.

Actually, I\'ve written a function which

相关标签:
1条回答
  • 2021-01-04 18:37

    You can use isempty. For instance:

    >> isempty([])
    
    ans =
         1
    
    >> isempty([42])
    
    ans =
         0
    
    0 讨论(0)
提交回复
热议问题