In <knlanj$vq$
1...@reader1.panix.com> kj <
no.e...@please.post> writes:
>In <knj97p$fuf$
1...@speranza.aioe.org> dpb <
no...@non.net> writes:
>>On 5/22/2013 2:39 PM, kj wrote:
>>> I have a cell array A of size N * M, containing only strings.
>>>
>>> I want to efficiently generate the N * 1 matrix B such that B(K)
>>> equals strjoin(A(K, :), SEP), for some separator string SEP.
>>>
>>> I can always do this using a for-loop, but I've found it to be
>>> extremely slow.
>>>
>>> Is there a way to speed up the operation? (I'm thinking that maybe
>>> there's a way to vectorize the operation, but I have not been able
>>> to figure out how to do it.)
>>...
>>Isn't it just
>>B=strcat(A, (repmat(SEP,length(A),1))); % ?
>Thanks, but when I try this I get the error
> Error using cell/strcat (line 45)
> All the inputs must be the same size or scalars.