From: Maxx Chatsko on
Hello all,
When you ask MatLab isempty(struct(n)) where n corresponds to an empty [], why does is return false? Any way to delete empty [] that are in a structure?
Thanks
Maxx
From: Matt Fig on
"Maxx Chatsko" <chatskom(a)chemimage.com> wrote in message <i3f6bp$cdb$1(a)fred.mathworks.com>...
> Hello all,
> When you ask MatLab isempty(struct(n)) where n corresponds to an empty [], why does is return false? Any way to delete empty [] that are in a structure?
> Thanks
> Maxx



I get the expected:
>> isempty(struct([]))
ans =
1

What version are you using, and are you sure isempty(n)?
From: Walter Roberson on
Maxx Chatsko wrote:
>
> When you ask MatLab isempty(struct(n)) where n corresponds to an
> empty [], why does is return false? Any way to delete empty [] that are
> in a structure?

Could you give an example?

2008b,

>> n = []
n =
[]
>> isempty(struct(n))
ans =
1


Are you perhaps asking about

isempty(struct)

which does return false?
From: Maxx Chatsko on
Walter Roberson <roberson(a)hushmail.com>

WOW! Sorry I must have just screwed it up. Long day?