From: Norberto Barroca on
When I make this:

bucket(1)=dlnode(1);
bucket(2)=dlnode(2);
bucket(1).Data(length(bucket(1).Data))=[];
bucket(2).Data(length(bucket(2).Data))=[];

bucket.Data

if(isempty(bucket.Data))
fprintf('isempty')
else
fprintf('notempty')

end
I have this error:
??? Error using ==> isempty
Too many input arguments.

Error in ==> beta at 49
if(isempty(bucket.Data))


Can someone help me?
From: Matthew Whitaker on
Hi Norberto,
In you call to isempty enclose the bucket.Data in square brackets so:
bucket(1)=dlnode(1);
bucket(2)=dlnode(2);
bucket(1).Data(length(bucket(1).Data))=[];
bucket(2).Data(length(bucket(2).Data))=[];
bucket.Data
if(isempty([bucket.Data]))
fprintf('isempty')
else
fprintf('notempty')
end

Hope this helps

Matt W





"Norberto Barroca" <norberto.barroca(a)hotmail.com> wrote in message <hhd7hb$sd1$1(a)fred.mathworks.com>...
> When I make this:
>
> bucket(1)=dlnode(1);
> bucket(2)=dlnode(2);
> bucket(1).Data(length(bucket(1).Data))=[];
> bucket(2).Data(length(bucket(2).Data))=[];
>
> bucket.Data
>
> if(isempty(bucket.Data))
> fprintf('isempty')
> else
> fprintf('notempty')
>
> end
> I have this error:
> ??? Error using ==> isempty
> Too many input arguments.
>
> Error in ==> beta at 49
> if(isempty(bucket.Data))
>
>
> Can someone help me?