ismember checks for cell-array or matrix elements. How do we check for string-numeric elements together? Please see below:
cell1 = {'netincome' [1] ; 'equity' [2] } ;
cell2 = { 'cogs' [2222] [1] ; 'equity' [3501] [2] ;
'equity' [3333] [1] ; 'netincome' [1751] [1] } ;
This fails ->ismember(cell1(:,[1 2]), cell2(:,[1 3]) % I know why it fails.
Is there any way to match string elements and numeric elements from 2 cells? I tried using ismember independently (cell2mat func was used) but still can't hit the right answer. The desired answer is:
[1751 ; 3501] ; OR 'netincome' [1751] [1] ; 'equity' [3501] [2]
cell1andcell2unique (i.e. no repeats)? Are the entries incell1guaranteed to have a match incell2? - gnovicecell1entries are unique when you consider col1 & col2 together.cell2entries are NOT unique for col1 and col3. Certain rows can be repeated Ans2. Yes, always! - Maddy