Thread Subject: empty cells

Subject: empty cells

From: sujata

Date: 27 Jan, 2010 09:14:05

Message: 1 of 2

Hello

I have a 30 by 3 cell matrix that is like this. My question is if I select the second (or third) column how can I filter out the empty cells ''. I only want to choose those entries that have actual text data. I tried char which doesn't really get me what I want.

Can anyone help?

'text5' 'text38' 'text57'
'text6' 'text39' 'text58'
'text7' 'text40' 'text59'
'text8' 'text41' 'text60'
'text9' 'text42' 'text61'
'text10' 'text43' 'text62'
'text11' 'text44' 'text63'
'text12' 'text45' 'text64'
'text13' 'text46' 'text65'
'text14' 'text47' ''
'text15' 'text48' ''
'text16' 'text49' ''
'text17' 'text50' ''
'text18' 'text51' ''
'text19' 'text52' ''
'text20' '' ''
'text21' '' ''
'text22' '' ''
'text23' '' ''
'text24' '' ''
'text25' '' ''
'text26' '' ''
'text27' '' ''
'text28' '' ''
'text29' '' ''
'text30' '' ''

Subject: empty cells

From: Jos (10584)

Date: 27 Jan, 2010 09:25:05

Message: 2 of 2

"sujata" <sujatagp@gmail.com> wrote in message <hjp04t$src$1@fred.mathworks.com>...
> Hello
>
> I have a 30 by 3 cell matrix that is like this. My question is if I select the second (or third) column how can I filter out the empty cells ''. I only want to choose those entries that have actual text data. I tried char which doesn't really get me what I want.
>
> Can anyone help?
>
> 'text5' 'text38' 'text57'
> 'text6' 'text39' 'text58'
> 'text7' 'text40' 'text59'
> 'text8' 'text41' 'text60'
> 'text9' 'text42' 'text61'
> 'text10' 'text43' 'text62'
> 'text11' 'text44' 'text63'
> 'text12' 'text45' 'text64'
> 'text13' 'text46' 'text65'
> 'text14' 'text47' ''
> 'text15' 'text48' ''
> 'text16' 'text49' ''
> 'text17' 'text50' ''
> 'text18' 'text51' ''
> 'text19' 'text52' ''
> 'text20' '' ''
> 'text21' '' ''
> 'text22' '' ''
> 'text23' '' ''
> 'text24' '' ''
> 'text25' '' ''
> 'text26' '' ''
> 'text27' '' ''
> 'text28' '' ''
> 'text29' '' ''
> 'text30' '' ''

help cellfun

Jos

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
cell array sujata 27 Jan, 2010 04:19:05
rssFeed for this Thread

Contact us at files@mathworks.com