How to use regexp in a cell array whose cells may contain cell entries
Show older comments
Hello,
Ι have the following cell array

I want to use -regexp to find where 'Carbon fixation' is written.
I would use: regexp(model.subSystems,'Carbon fixation');
The problem is that some cells contain cell entries, so this is a problem.
I want to find where (and especially in which row) 'Carbon fixation' is written, in any cell in any cell entry.
Can anyone help me? Thank you!
4 Comments
Stephen23
on 8 Jan 2022
@Ioannis Vourvachakis: please upload the cell array in a .mat file by clicking the paperclip button.
Ioannis Vourvachakis
on 8 Jan 2022
Ioannis Vourvachakis
on 8 Jan 2022
Stephen23
on 8 Jan 2022
"The problem is that some cells contain cell entries, so this is a problem. "
All of them do:
>> all(cellfun(@iscell,model.subSystems))
ans =
logical
1
Accepted Answer
More Answers (0)
Categories
Find more on Characters and Strings 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!