I have the following problem with a cell construct:
hilfe =
Columns 1 through 4
[] [] 'IPF22252.1' 'IPF11815.2'
Column 5 through 8
'Contig4-2494_0015' [] 'CA1232' []
Column 8
[]
Now I want to delete the empty cells. I tried it with the
command isempty in cooperation with an if-construct. But it
does not work.
My aim is such cell construct:
"Corinna Schmitt" <csc@igb.fhg.de> wrote in message
<fmqcvl$5d7$1@fred.mathworks.com>...
> Hallo,
>
> I have the following problem with a cell construct:
>
>
> hilfe =
>
> Columns 1 through 4
>
> [] [] 'IPF22252.1' 'IPF11815.2'
>
> Column 5 through 8
>
> 'Contig4-2494_0015' [] 'CA1232' []
>
> Column 8
>
> []
>
> Now I want to delete the empty cells. I tried it with the
> command isempty in cooperation with an if-construct. But it
> does not work.
> My aim is such cell construct:
>
> result =
>
> Columns 1 through 3
>
> 'IPF22252.1' 'IPF11815.2' 'Contig4-2494_0015'
>
>
> Column 4
>
> 'CA1232'
>
> Thanks, Corinna
In article <fmqcvl$5d7$1@fred.mathworks.com>, csc@igb.fhg.de says...
> Hallo,
>
> I have the following problem with a cell construct:
>
>
> hilfe =
>
> Columns 1 through 4
>
> [] [] 'IPF22252.1' 'IPF11815.2'
>
> Column 5 through 8
>
> 'Contig4-2494_0015' [] 'CA1232' []
>
> Column 8
>
> []
>
> Now I want to delete the empty cells. I tried it with the
> command isempty in cooperation with an if-construct. But it
> does not work.
> My aim is such cell construct:
>
> result =
>
> Columns 1 through 3
>
> 'IPF22252.1' 'IPF11815.2' 'Contig4-2494_0015'
>
>
> Column 4
>
> 'CA1232'
>
> Thanks, Corinna
>
c = {3 [] 2 [] 4:5 'q' []}
result = c(~cellfun('isempty',c))
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Disclaimer prior to use.