From: Alan B on
"ade77 " <ade100a(a)gmail.com> wrote in message <i0i635$hhk$1(a)fred.mathworks.com>...
> For example I have a cell array :
>
> A = {'you' 'me' 'go' ' ' 'give'}, this cell array has a many empty string (''), what will be the best option to remove this empty string.
>
> Thanks for any hint

Try using cellfun() with isempty().
From: Nathan on
On Jul 1, 6:44 am, "ade77 " <ade1...(a)gmail.com> wrote:
> For example I have a cell array :
>
> A = {'you' 'me' 'go' ' ' 'give'}, this cell array has a many empty string (''), what will be the best option to remove this empty string.
>
> Thanks for any hint

This can be done without cellfun:
A = {'you' 'me' 'go' '' 'give'};
A(strcmp('',A)) = [];

%%%%%%%%%%%%%
A =
'you' 'me' 'go' 'give'


-Nathan
From: ade77 on
Nathan <ngreco32(a)gmail.com> wrote in message <cb00de37-cde6-4d98-8181-9ac2170e351b(a)t10g2000yqg.googlegroups.com>...
> On Jul 1, 6:44 am, "ade77 " <ade1...(a)gmail.com> wrote:
> > For example I have a cell array :
> >
> > A = {'you' 'me' 'go' ' ' 'give'}, this cell array has a many empty string (''), what will be the best option to remove this empty string.
> >
> > Thanks for any hint
>
> This can be done without cellfun:
> A = {'you' 'me' 'go' '' 'give'};
> A(strcmp('',A)) = [];
>
> %%%%%%%%%%%%%
> A =
> 'you' 'me' 'go' 'give'
>
>
> -Nathan

Deep Appreciation (Nathan , Alan)