# Matlab cell functions

1. Mar 14, 2009

### hoffmann

how do i match up values in a cell array with a double array? for example:

i have a cell array wordmc with the following values:

C1C5
C4C48C279C12526
C13C58C499
C47C479C579
...(7000 values)

i would like to match these values up to another column double of 7000x1 total_table:

2
4
3
1
...

so the first row of the cell C1C5 would have a corresponding value of 2, and so on.

i would like to take the values of the cell array with 2 'C' and a 2 in total_table and match them up to another cell array MAP1 (the same structure as wordmc) using ismember. i would like to take the values of the cell array with 3 'C' tags and a 3 in total_table and match them up to MAP1 using ismember. i know how to count the number of 'C's using the following code:

numC = cellfun(@(x) numel(strfind(x,'C')), wordmc)

i just don't know how to select the ones with a 3 or a 2 in total_table. i think the following pseudocode will work:

numC = cellfun(@(x) numel(strfind(x,'C')), wordmc)
wordmc(numC =3D=3D 2 & total_table =3D=3D 2)

the thing is, i have no idea what 3D notation is. what function does that require and what do i replace the 3D with? thanks!