look for data in cell array and avoid certain data during that search
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Can any one help me to write a code on below condition. I have a cell which have 10 entries. I need to look specific char in that cell array if that found i need to get line number of that specific data in integer format. At the same i need to avoid certain data that will count. for example a b (c) d e (f) g here am looking for (f) so i need to get line number as 5. Because i need to avoid all data that are in () while counting for line number . after first execution i need to look for (c) and then continue for other data that are in (c).
0 commentaires
Réponses (1)
Max Heimann
le 16 Jan 2022
You could try regexp. It accepts cells of strings and returns the indices of the matches for each cell entry.
If you want to exclude certain data from the count you could eliminate those entries with regexprep or a combination of cellfun and regex first.
The correct expression for your problem depends very much on the contents of your cells.
0 commentaires
Voir également
Catégories
En savoir plus sur Cell Arrays dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!