Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: concatenate cell array
Date: Wed, 1 Jul 2009 19:03:01 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 22
Message-ID: <h2gbt5$c0i$1@fred.mathworks.com>
References: <h2g8m1$e5k$1@fred.mathworks.com> <h2g9vp$7rm$1@fred.mathworks.com> <h2gaph$sv6$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246474981 12306 172.30.248.37 (1 Jul 2009 19:03:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 1 Jul 2009 19:03:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:552138


"Diego Lass" <dlISCool@gmail.com> wrote in message <h2gaph$sv6$1@fred.mathworks.com>...
> Unfortunately, I don't know the size before hand.
> for ..
>     if GOOD
>         concatenate A
>    end
>  end 
> 
> If determines whether I should concatenate A 
> 
> Diego  

one of the solutions is outlined below

     c={};
for  i=1:n
if   bitand(i,1)
     c=[c,{i:i}];
end
end

us