help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to test empty struct?


From: John W. Eaton
Subject: how to test empty struct?
Date: Thu, 28 Oct 2010 16:37:19 -0400

On 28-Oct-2010, Eric Chassande-Mottin wrote:

| how does one test that a structure array is empty?
| it does not seem possible with the usual function
| for vectors.
| 
| a=struct; length(a), isempty(a)
| ans =  1
| ans = 0

If you want an empty struct array, you have to write

  struct ([])

Things are done this way for Matlab compatibility.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]