From: Norberto Barroca on 29 Dec 2009 10:34 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 29 Dec 2009 16:03 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?
|
Pages: 1 Prev: save Variables in Gui view Next: Code for simulation of the Clayton n-copula, n>2 |