comparing columns of cell arrays
Show older comments
Hi,
I am new to matlab and would like to compare two cell arrays of a structure which have a different size.
My first field (drug.compound) of the structure (named drug) contains one column of IDs (28722x1) and my second field(drug.enzymes) contains one column of IDs 877x1. I would like to make a table in which the relation is shown between the IDs [28772×857] by a logical array.
Any suggestions?
I tried the strcmp function and == operator but not seem to work
2 Comments
@Bouchra Ezzamouri: please describe the contents of the cell arrays: are they numeric arrays, or character vectors, or string arrays, or ... ? If you are not sure, please run these commands:
class(drug.compound{1})
class(drug.enzymes{1})
and tell us their outputs. It would be easiest if you simply uploaded the structure in a .mat file, by clicking the paperclip button.
Bouchra
on 8 Feb 2019
Accepted Answer
More Answers (1)
Bouchra
on 8 Feb 2019
0 votes
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!